how to solve this MATLAB solve error?

3 visualizaciones (últimos 30 días)
Randy Chen
Randy Chen el 1 de Oct. de 2021
Respondida: Jan el 2 de Oct. de 2021
I'm trying to solve a simple set of linear equations:
syms m U2
eqn1 = 0.0004*200*10^6*(-3/4*U2-sqrt(3)/4*0.05)==0;
eqn2 = 0.0004*200*10^6*(sqrt(3)/4*U2+1/4*0.05)== -m*9.81;
sol = solve([eqn1,eqn2]);
However, this error is returned:
Error using solve (line 90)
Error using maplemex
Error, (in MTM:-solve) Vector[row](2, [0,0], datatype = integer[1]) is not valid equation or expression
Error in group_challenge2 (line 21)
sol = solve([eqn1,eqn2]);
How should I fix this issue?

Respuesta aceptada

Jan
Jan el 2 de Oct. de 2021
This looks suspicious: "datatype = integer[1]" ?!
Maybe there is some preceeding code, which causes problems? At least the show piece of code is running fine here:
syms m U2
eqn1 = 0.0004*200*10^6*(-3/4*U2-sqrt(3)/4*0.05)==0;
eqn2 = 0.0004*200*10^6*(sqrt(3)/4*U2+1/4*0.05)== -m*9.81;
sol = solve([eqn1,eqn2])
sol = struct with fields:
U2: -3^(1/2)/60 m: 0

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by