Skip to main content
14-Alexandrite
February 17, 2019
Solved

Shows variable is undefined

  • February 17, 2019
  • 1 reply
  • 14701 views

Hello,

 

I am trying to work with my final solution but Mathcad is saying the variable is undefined even though it's being defined earlier. I have attached the file. Any help will be really appreciated.

 

Thank you,

Faisal

Best answer by Werner_E

Is one of the following two function what you are looking for?

B1.png

or

B2.png

1 reply

23-Emerald IV
February 17, 2019

It's not alpha.1, but psi.ini that is undefined.

Mathcad was never superb at locating exact positions of errors.

 

Success!
Luc

fahmed-214-AlexandriteAuthor
14-Alexandrite
February 17, 2019

Thank you for your response. What should I do to make it solved

23-Emerald IV
February 17, 2019

Define psi.ini, or take it out of the function, if you don't need it, but I guess you have it in because it serves a purpose. Maybe you are mistaken and meant psi.0 ....?

 

One thing that will help you, is if you take the immediate evaluation off of the end of the definition.

Just define the psi.new function (in terms of K() and the rest), but do NOT put an equals sign at the end.

See if that goes without error. If there are errors in there, solve those first. Then you can evaluate the function.

 

Success!
Luc