Skip to main content
1-Visitor
December 3, 2016
Question

Solve output definition

  • December 3, 2016
  • 2 replies
  • 1804 views

Greetings community,

Is it possible to define the output from the solve function as a new variable?

Have a nice day,

Jorge

2 replies

12-Amethyst
December 5, 2016

Yes, just use the : as normal to assign the value / result.

Example is for an Ode, but the same will apply for any solve block.

Mathcad 15:

Capture.PNG

Prime (2):

Capture.PNG

Because Prime handles the units a little better I was experimenting with this program to learn about prime - still not convinced...

Hope this helps

Andy

25-Diamond I
December 5, 2016

In case you had the symbolic "solve" in mind, the same as Andy already said applies - simply use the assignment operator := in front. In case of the system of equations example below you must know that the symbolics returns a row vector (while the numeric solve block "find" would return a column vector) and of course you have to be sure that only one solution exists and so the result vector will have one row only.

The screenshot is of Mathcad 15 but it works the same way in Prime, too.