Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I am using MathCAD Prime 5.0.0.0 and I am trying to use a Solver Block for the first time in Prime (I recall using it successfully in the pre-Prime MC).
I am wanting to solve a single ODE. So I decided to run through the Task 3-3:Solving ODEs with Solve Blocks tutorial on the support site to figure out the correct syntax etc.
I defined the 3 variables: m, c, and k as shown in the tutorial.
I defined the function u(t) as shown in the tutorial.
I then created a solve block by clicking on the Solve Block button under the Math menu tab.
That put the Solve Block with the Guess Values, Constraints, and Solver regions in my MathCAD worksheet.
My understanding from the tutorial is that I did not need to enter anything in the Guess Values regions but that I would need to enter the formula for the derivatives of x(t) in the Constraints region along with the two initial value expressions. And that I would then need to enter the x := odesolve(x(t), 20) in the Solver region.
But as I was typing the derivatives formula m*x''(t) + c*x'(t) +k*x(t)=u(t), the MathCAD syntax checker highlights the first x in the formula with the message "This variable is undefined. Check that the label is set correctly."
But the tutorial does not show x being defined or set anywhere. I am probably being dense but I am hoping someone will explain what I am doing wrong. 🙂
Solved! Go to Solution.
You've used an evaluation '=' instead of an equals '='. Type [CTRL-=] instead of just =.
Success!
Luc
Please attach your worksheet.
Luc
OK, I have attached the file... I am assuming I am making some newbie mistake.
Thanks!
You've used an evaluation '=' instead of an equals '='. Type [CTRL-=] instead of just =.
Success!
Luc
Thanks!... It works for me too.
They might want to make it clear in the documentation and the tutorial that you have to use ctl-=. 🙂
Just sayin'
@ddenholm wrote:
They might want to make it clear in the documentation and the tutorial that you have to use ctl-=. 🙂
Just sayin'
As a matter of fact.... They do, at least in the documentation:
https://support.ptc.com/help/mathcad/en/index.html#page/PTC_Mathcad_Help%2Fto_define_a_solve_block.html where it says you have to use the "Equal To operator".
Success!
Luc
P.S. You may want to mark this topic as 'answered'...
How did you type the prime symbols for the derivatives?
You can't simply type quotes but have to use the derivative symbols from the operators menu.
If you are happy, they keyboard shortcut ctrl+' works for you (it doesn't in my version - I have to type ctrl+ä on my German keyboard!).
I think I was entering the primes correctly for the derivatives. I selected them from the menu Math/Operators/Calculus/x'
I uploaded my file in a reply to an earlier post if you want to take a look at it.
Thanks!