10 Replies Latest reply: Mar 21, 2012 11:53 AM by ptc-4507537

# programming a function whose result is a function

Hi...

Can someone tell my why I can't programm a function whose result is a function? Or show me a solution?

I have attach a file with the problem.

Thank you...

• ###### Re: programming a function whose result is a function

No file attached.

Mike

• ###### Re: programming a function whose result is a function

It looks to me like you're trying to do symbolic math. While mathcad has a symbolic processor it's weak and buggy compared to some others.

That said, you can do what you want, just not in a program.

• ###### Re: programming a function whose result is a function

Something like the attached?

Next time please include a Mathcad file, not only a screenshot.

WE

• ###### Re: programming a function whose result is a function

I believe he was meant to attached the worksheet, not just a screenshot.

Mike

• ###### Re: programming a function whose result is a function

Thank you for your suggestions

I must constantly transform a polygon (s-Domain) in a normal form. For this I need a symbolic function that I can call always.
I think that Mathcad can' t access a vector in a defined function.

I attach my Mathcad worksheet to my message

• ###### Re: programming a function whose result is a function

Does the attached help any?

Alan

Edited: Slightly improved file.

• ###### Re: programming a function whose result is a function

I can get some of the way to understanding what MathCad is doing, but there are a number of issues that don't make sense.

1. Changing N & D to N(x) & D(x) in the std definition stops it working,

2. Calculating Z.3(0) fails but creating a function y with the substitution works ??

I must be missing something obvious...

Hopefully the attached helps but I would appreciate knowing the final outcome (if it works)

Regards

Andy

• ###### Re: programming a function whose result is a function

Here's a vectorised version.

Alan

• ###### Re: programming a function whose result is a function

Thank you for your help. the solution of Alan ist good.

Regards

Oliver