cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

How to get the result as a column instead of a row?

OO_14410365
2-Explorer

How to get the result as a column instead of a row?

OO_14410365_0-1763840308099.png

 

8 REPLIES 8

Unfortunately, I only have Express, so I can't help with the presentation of the symbolic result.

 

Perhaps, try putting the variables in a vector?

 

            [x_1]

solve, |y_1|

            [z_1]

 

You can assign the result to a variable and transpose it.

 

However, is there any particular reason you want to use the symbolic processor to solve the equation, when a numeric solution seems to give reasonable results?

 

2025 11 22 A.png

 

Stuart

Stuart's got it: simply assign result to a vector and then take transpose.  P11 file attached.

rgunwaldsen_0-1763849009158.png

 

Werner_E
25-Diamond I
(To:OO_14410365)

The symbolic solve will always provide the solutions row-wise and there is no option to set which will change this behaviour. You will get further rows for non-linear systems and each row represents a solution set.

I also think that in case you are just looking for the numeric values its better to use a numeric method and not the symbolics. Stuart has already shown some ways. Other options are the usage of the "lsolve" function

Werner_E_0-1763859031709.png

or using a solve block with "find" (you have to provide arbitrary guess values) which displays its results column-wise as you like it.

Werner_E_1-1763859098205.png

 

Using the symbolics makes sense if you are looking for symbolic solutions (in case your system contains some variables)

Werner_E_3-1763859285115.png

and, yes, in this case displaying the results column-wise sure makes sense 😉

 

Another reason for using  the symbolics could be that you want 'exact' results, displayed in fractions (and maybe pi, e, etc) and not a decimal approximation. Unfortunately the symbolics automatically switches into float-mode as soon as just one decimal point is present. So you must also provide your information with fractions, i.e. 3/2, even though 1.5 is also an exact value.

Werner_E_4-1763859563707.png

 

You may also assign the result of the symbolic "solve" a row vector (1 x 3 matrix) with three variables which you then can evaluate symbolically or numerically and use for further calculations.

Werner_E_5-1763859749872.png

 

StuartBruff
23-Emerald IV
(To:Werner_E)

Will the symbolic processor accept a vector [x,y,z] as a parameter to the solve keyword?

 

(where [x,y,z] is a column vector)

 

Stuart

 

(Unfortunately, lsolve is a Premium function not available to us lowly Express users, and I'm getting loath to suggest things I can't check)

Werner_E
25-Diamond I
(To:StuartBruff)


@StuartBruff wrote:

Will the symbolic processor accept a vector [x,y,z] as a parameter to the solve keyword?

 

(where [x,y,z] is a column vector)

 


Yes, the symbolics accepts the list of variables as I did, but also a vector. It does not matter if its a column or a row vector.

Werner_E_0-1763872201886.png

Werner_E_1-1763872230801.png

It also accepts a mixture

Werner_E_2-1763872273913.png

 

StuartBruff
23-Emerald IV
(To:Werner_E)

That's annoying.  Does that classify as a bug?

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)

Doesn't feel like a bug to me. But if its a bug then its a bug present already in Mathcad. At least the behaviour is the same in Mathcad 15.

 

If Prime would provide a data type 'list', we could demand that we expect to see the results presented in exact the way as we provide the variables to be solved.

So we would see them as column vector when provide [x,y,z] as a column vector as argument of 'solve'.

But as long as there is no data type (comma separated) list implemented I guess I am happy with the behaviour we have.

 

LucMeekes
23-Emerald IV
(To:StuartBruff)

lsolve is easily implemented in Express (for many, if not most, but certainly not all circumstances) with:

LucMeekes_0-1763923600434.png

yielding:

LucMeekes_1-1763923645980.png

Success!
Luc

Announcements

Top Tags