Check for missing argument or incorrect argument data type in call to function 'solve'.

14 visualizaciones (últimos 30 días)
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?

Respuestas (1)

KSSV
KSSV el 5 de Mzo. de 2021
Editada: KSSV el 5 de Mzo. de 2021
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 comentario
Walter Roberson
Walter Roberson el 5 de Mzo. de 2021
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.

Iniciar sesión para comentar.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by