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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Function Composition

AdrianBaker
7-Bedrock

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?

ACCEPTED SOLUTION

Accepted Solutions

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

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.

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

fcomp.jpg

StuartBruff
23-Emerald III
(To:AdrianBaker)

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

Top Tags