A problem formatting a list returned from solve()
Publié : mar. juin 18, 2019 7:27 pm
I have a solution to some problem:
solution := [z-4, 25-2*z, z]
And I'm trying to see what happens when 'z' runs from 0 to 9, so I do:
makelist(x->subst(solution, [z=x]), 0, 9)
This works ok. 'xcas' displays the big list as a nice matrix which is easy to read.
The problem is that in reality my 'solution' is the result of solve(). When this happens, 'xcas' doesn't print the big list as a nice matrix.
Example:
solution := solve([x+y+z=21,2x+3y+4z=67],[x,y,z])
makelist(x->subst(solution, [z=x]), 0, 9)
xcas now prints the big list on one line, which is hard to read.
Why is that? Doesn't solve() return a real list?
solution := [z-4, 25-2*z, z]
And I'm trying to see what happens when 'z' runs from 0 to 9, so I do:
makelist(x->subst(solution, [z=x]), 0, 9)
This works ok. 'xcas' displays the big list as a nice matrix which is easy to read.
The problem is that in reality my 'solution' is the result of solve(). When this happens, 'xcas' doesn't print the big list as a nice matrix.
Example:
solution := solve([x+y+z=21,2x+3y+4z=67],[x,y,z])
makelist(x->subst(solution, [z=x]), 0, 9)
xcas now prints the big list on one line, which is hard to read.
Why is that? Doesn't solve() return a real list?