how to solve this MATLAB solve error?

4 次查看(过去 30 天)
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?

采纳的回答

Jan
Jan 2021-10-2
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Particle & Nuclear Physics 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by