The PTC Community is on temporary read only status in preparation for moving our community to a new platform. Learn more here
I am using Mathcad Prime 11 and I am a bit confused about how symbolic solving and variable definition work. In my worksheet, I use the symbolic solve operator and Mathcad returns a value for VBL, but when I try to evaluate the variable afterward, it still appears undefined or does not behave as I expect. I am not sure whether I am using the wrong operator, whether the symbolic result is not actually being assigned to the variable, or whether I should be using a solve block instead. The following screenshot describes the issue. I would really appreciate any guidance on what I am doing wrong and how to properly define and reuse the solved variable in the worksheet.
You should attach the worksheet, the .mcdx file. A picture may paint a thousand words, the worksheet works even better.
You may have to put it in a .zip file and attach that, since this forum sometimes has a problem with worksheets .
Success!
Luc
Please find the worksheet attached below.
Thanks for your time.
The symbolic solve that you used does NOT define x. In order to do that you have to define x as being the solution to your symbolic solve. To do that you can precede the solve by typing :x in front of it.
You should get this:
solve, x
x := 3 x + 4 = 7 ----------> 1
Now x is defined.
Background: realise that Prime contains two different processors, a numeric processor and a symbolic processor. They both have their traits and peculiarities.
The numeric processor requires that all variables are (numerically) defined, and works fine with units.
The symbolic processor is happy to work with symbols, even if their (numerical) value is unknown, but it treats units as symbols as well, so it will only cancel units if they are the same symbols.
Success!
Luc
Prime's symbolics does not know anything about units and treats kN as the name of an unknown variable.
And then there is Prime's infamous auto-labelling doing wrong - as you can see the "kN" in the result is not bold blue which means its not labelled as "Unit". That's the reason why subsequent usage of VBL in numeric evaluations fails.
For this second problem there is a cure. Turn on the option "Units in symbolics" in the calculation options and then let the worksheet recalculate (Ctrl+F5).
The symbolics still is not aware of units but the auto-labelling should do now a better job and this should fix your problem.
The sheet you posted shows a different problem, though. You have to assign the output of the symbolic solve a variable to be able to use it later:
Turning on the above mentioned calculation option should solve the problem with VBL in your original worksheet, but usually its better not to use the symbolics if you are just looking for a numeric value. Using a numeric method (solve block with 'find' or the 'root' function) is preferable.
When you use the 'root' function, Fy would have to be defined as a function of VBL, though.
When you use a solve block it's also preferable to have Fy defined as a function in VBL. But it may also possible (not sure as you don't show the definition of Fy) to use your definitions as they are but then you would have to solve for both, Fy and VBL.
Here an example of what I am talking about using the example in the sheet you posted:
