MATLAB中的SOLVE函数不但能解直接求解,还能求解带参数的方程:<br>clear all<br>syms R X a b c d x1 x2 x3 x4;<br>[x1,x2,x3,x4]=solve('R*x1+R*x3-X*x4=a','R*x2+X*x3+R*x4=b','R*x1-X*x2+R*x3=c','X*x1+R*x2+R*x4=d','x1,x2,x3,x4')<br>我运行了一下结果如下:x1 =<br><br>(2*R^2*d-2*R^2*b+R*X*c+R*a*X+X^2*d)/X/(4*R^2+X^2)<br><br>x2 =<br><br>(-2*R^2*c+X*R*d+R*X*b-X^2*c+2*R^2*a)/X/(4*R^2+X^2)<br><br>x3 =<br><br>1/X*(-2*R^2*d+2*R^2*b+R*X*c+X^2*b+R*a*X)/(4*R^2+X^2)<br><br>x4 =<br><br>-(-2*R^2*c-X*R*d-R*X*b+2*R^2*a+X^2*a)/X/(4*R^2+X^2)<br><br>>>