Skip to main content
1-Visitor
May 12, 2013
Solved

Solve Block problem

  • May 12, 2013
  • 3 replies
  • 1634 views

I get the an error message when trying to solve a non-linear equation system. Next to the Find statement it says: 'This variable is undefined'. I can't find any mistake in the sheet and I don't know what's going on . Please open attached file for details.

The variables being solved for in the problematic solve block are initialized under section b).

Thanks in advance!

Best answer by Werner_E

Sorry, had my head full of other things, but I should have known it better as I posted the solution to a similar problem just two or three weeks ago (http://communities.ptc.com/message/200798#200798)

There is no need to get rid of or change the units! You are allowed to have different units as result of a solve block if you assign that result to a vector with individual elements and if you do not display the vector as a whole.

solve2.png

3 replies

23-Emerald I
May 12, 2013

Version 15 does not like mixed units in vector, matrices or in Find expressions.

If you divide by units to get just nimbers, you get an answer.

25-Diamond I
May 12, 2013

The error message "variable undefined" is the standard message at solve blocks, whatever the real error is. Error reporting generally is rather weak, but if you right click on the red expression and chose Trace you get a hint what the real cause may be.

trace3.png

So it seems to be a problem with units.

The result of a solve block is a vector and in Mathcad (15 and below) all elements of a vector or matrix must have the same unit - a nasty restriction as Fred already had pointed out. You may strip all units, as Fred suggested or in your case, as three of your solve variables are of the same unit, you can chose to make the fourth variable theta.c temporarily of that unit, too. Not ideal, but at least a way to workaround.

solve1.png

Werner_E25-Diamond IAnswer
25-Diamond I
May 12, 2013

Sorry, had my head full of other things, but I should have known it better as I posted the solution to a similar problem just two or three weeks ago (http://communities.ptc.com/message/200798#200798)

There is no need to get rid of or change the units! You are allowed to have different units as result of a solve block if you assign that result to a vector with individual elements and if you do not display the vector as a whole.

solve2.png