Check for missing argument or incorrect argument data type in call to function 'solve'.
조회 수: 8 (최근 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!