I want to create random variables for a way more complex program to read.
Some example code is:
a:random(20);
b:random(100);
[c]:solve(a = 2 * x + b, [x]);
tex(a);
tex(b);
tex(c);
however, the last line prints x=5 instead of 5.
is it somehow possible to get the value of the solutin in maxima?
The explanation is that
solvereturns a list of equations such asx = 5, not just values such as5.Of course the values are the right-hand sides of the equations. So you can do e.g.: