cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Function Composition

SOLVED
AdrianBaker
Newbie

Function Composition

I have been playing around with Mathcad Prime 2.0 and have been rather impressed with how simple and intuative it is to use compared to previous versions of Mathcad. I love the mathematical notation because I don't have to learn an awful c-based programming language (eg Matlab), to do my work. That was until I discovered that to compose the functions f(x) and g(x), instead of the intuitive mathematical notation f.g(x), you have to resort to f(g(x)), which looks more like programming and less like maths. It looks particularly horrible when used on multiple functions f(g(h(k(m(n(x)))))) and has you counting parentheses (somewhat reminiscent of lisp, but without the awesomeness) versus the more elegant and correct f.g.h.k.m.n(x)

Surely, this can't be that hard to implement?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Function Composition

I've discovered that I can fake it with a little bit of syntactic sugar!

fcomp.jpg

View solution in original post

3 REPLIES 3

Re: Function Composition

More simple example.

I can have in Mathcad 15 sin x as postfix operator.

I must have in Mathcad Prime sin(x) not sin x as in Math.

Re: Function Composition

I've discovered that I can fake it with a little bit of syntactic sugar!

fcomp.jpg

View solution in original post

Re: Function Composition

You can also partially get round it by creating a function to apply a function to a variable (or result of another function application) and then assigning the function to a symbol (eg, middot character).

It would be a nice feature to have, though ...

Stuart

collab - 12 09 03 function composition 01.JPG

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."