如何用matlab解一元三次方程
来源:百度知道 编辑:UC知道 时间:2024/09/21 03:34:20
0=x^3-6*x^2+9*x-9
谁能给出详细的过程和结果?
Undefined function or method 'solve' for input arguments of type 'char'
谁能给出详细的过程和结果?
Undefined function or method 'solve' for input arguments of type 'char'
把你方程的系数降幂排列,写成一个向量,利用roots命令即可。
>> p=[1,-6,9,-9];roots(p)
ans =
4.4260e+000
7.8701e-001 +1.1891e+000i
7.8701e-001 -1.1891e+000i
扩展资料
MATLAB线性方程求解
a为m*n的系数矩阵。
Ø m=n,该方程为“恰定”方程
Ø m>n,该方程为“超定”方程
Ø m<n,该方程为“欠定”方程
(1)恰定方程求解
方程ax+b(a为非奇异)
x=a-1 b