可能重复:
保存符号方程供以后使用?
从这里开始,我试图解决这样的符号方程组
syms x y z;
[x, y, z] = solve('z = 4*x', 'x = y', 'z = x^2 + y^2')
x =
0
2
y =
0
2
z =
0
8
除了我的方程是在 m 文件中的不同点和随机系数生成的。我的问题是如何完成以下...
// Generate the first equation.
n = *random number generated here*;
E1 = (z == n*x + 2*n); // <--- How to save this symbolic equation to use in "solve(...)" later?
// Other work, generate other eqs.
...
// Solve system of eqs.
[x, y, z] = solve( E1 , E2, E3) // What/How to call/use the previously saved symbolic equations.
谢谢您的帮助!