Skip to main content
1-Visitor
June 1, 2015
Solved

Units issue when defining a function

  • June 1, 2015
  • 1 reply
  • 1471 views

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

Best answer by RichardJ

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.

1 reply

RichardJ19-TanzaniteAnswer
19-Tanzanite
June 1, 2015

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.

mjenner1-VisitorAuthor
1-Visitor
June 2, 2015

Got it,

Thanks!