how to solve this MATLAB solve error?

조회 수: 3 (최근 30일)
Randy Chen
Randy Chen 2021년 10월 1일
답변: Jan 2021년 10월 2일
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