Attached are two Mathcad 15 M050 files. The Test_SUBROUTINE worksheet works; however, Test_FUNCTION worksheet does not work. I assume it is because a vector cannot have arguments? I really want to use the Test_Function worksheet as a reference sheet in other programs. Any help is appreciated.
Reg
Solved! Go to Solution.
You cannot use range variables inside a program like you do on worksheet level.
You have to use for-loops instead.
This small modification makes your function PPD work as you expected:
A vector is not a function, so you cannot associate parameters to it. But you can define a function (with parameters) that results in a vector.
I see you're trying to create a function that does something similar to the built-in logspace() function...
That wasn't available in Mathcad 11, so long a go I created my own version, which accepts units:
It's attached. If you can't use logspace() and still want to create your own function, you can use and/or adapt my function.
Success!
Luc
“But you can define a function (with parameters) that results in a vector.”
Please explain with example. Thanks
Sorry, didn’t see the example on my iPad...needed to scroll down.
Thanks Luc for the help. I also recalled this method form Quick Sheets in an old MATHCAD 6. It works as a function definition.
Thanks again.
Reg
You cannot use range variables inside a program like you do on worksheet level.
You have to use for-loops instead.
This small modification makes your function PPD work as you expected:
Werner,
Thanks much. I thought I had done that in one of my trials...apparently not. 🤔😩
Thanks again.