Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Attached illustrates the problem where I calculate the constants a and b of a linear function. Next I define the function, but it doesn't really work - only partly.
What am I doing wrong?
Kind regards,
Michael
Solved! Go to Solution.
Notice that the "a" in the function definition and the "a" in the function call look different? That's because the label for one is set to "variable". but for the other it's set to "function". They need to be set the same. Also, the symbolic processor does not really understand units. Notice that the "m" and "s" from the symbolic evaluation display as variables, not units. Split the symbolic evaluation from the function definition. When you call the function you also have "s" as a variable, which is not defined, rather than the defined unit for seconds. If you fix the other problems Mathcad should fix that for you automatically though.
Notice that the "a" in the function definition and the "a" in the function call look different? That's because the label for one is set to "variable". but for the other it's set to "function". They need to be set the same. Also, the symbolic processor does not really understand units. Notice that the "m" and "s" from the symbolic evaluation display as variables, not units. Split the symbolic evaluation from the function definition. When you call the function you also have "s" as a variable, which is not defined, rather than the defined unit for seconds. If you fix the other problems Mathcad should fix that for you automatically though.
Got it,
Thanks!