Check for missing argument or incorrect argument data type in call to function 'solve'.
11 次查看(过去 30 天)
显示 更早的评论
syms x1 x2 x3
Y=solve('4.4*x1-2.5*x2+19.2*x3-10.8*x4=4.3', '5.5*x1-9.3*x2-14.2*x3+13.2*x4=6.8', '7.1*x1-11.5*x2+5.3*x3-6.7*x4=-1.8', '14.2*x1+23.4*x2-8.8*x3+5.3*x4=7.2')
Check for missing argument or incorrect argument data type in call to function 'solve'.
why does it give an error?
0 个评论
回答(1 个)
KSSV
2021-3-5
编辑:KSSV
2021-3-5
syms x1 x2 x3 x4
eqn{1} = 4.4*x1-2.5*x2+19.2*x3-10.8*x4-4.3==0 ;
eqn{2} = 5.5*x1-9.3*x2-14.2*x3+13.2*x4-6.8==0 ;
eqn{3} = 7.1*x1-11.5*x2+5.3*x3-6.7*x4+1.8 ==0 ;
eqn{4} = 14.2*x1+23.4*x2-8.8*x3+5.3*x4-7.2==0 ;
s = vpasolve(eqn{:}) ;
x1 = s.x1 ;
x2 = s.x2 ;
x3 = s.x3 ;
x4 = s.x4 ;
OR
syms x1 x2 x3 x4
Y=solve(4.4*x1-2.5*x2+19.2*x3-10.8*x4==4.3, 5.5*x1-9.3*x2-14.2*x3+13.2*x4==6.8, ......
7.1*x1-11.5*x2+5.3*x3-6.7*x4==-1.8, 14.2*x1+23.4*x2-8.8*x3+5.3*x4==7.2)
1 个评论
Walter Roberson
2021-3-5
Right.
The reason it gives an error is that that form of solve was supported until roughly r2017a, but has not been supported since then. Now only dsolve() supports quoted strings and that is expected to end soon.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!