필터 지우기
필터 지우기

How to solve this equation Numerically [VPASOLVE]

조회 수: 2 (최근 30일)
Meddour Aissam riad
Meddour Aissam riad 2020년 10월 1일
답변: Alan Stevens 2020년 10월 1일
Hi there,
When i try to numerically solve my equation i got the following error :
Error using mupadengine/feval_internal (line 172)
More equations than variables is only supported for polynomial systems.
I simplified the equation to give you an example, and here is the equation example (the matlab code):
syms Idn
%%data
Ism=200;
Wb=1500;
speedend=6000;
Vsm=100;
Ws=Wb:15:speedend;
Eq2=Idn==sqrt(Idn)+(((2.4*10.^(-5))*(Idn).^2-0.013*(Idn+3.3)*10^(-3)))*Ws/Vsm %%The equation
Idn=vpasolve(Eq2,Idn)
Can anyone help me to solve this kind of equation?
  댓글 수: 1
Star Strider
Star Strider 2020년 10월 1일
Probably not.
When I ran this:
syms Idn
%%data
Ism=200;
Wb=1500;
speedend=6000;
Vsm=100;
Ws=Wb:15:speedend;
Eq2=Idn==sqrt(Idn)+(((2.4*10.^(-5))*(Idn).^2-0.013*(Idn+3.3)*10^(-3)))*Ws/Vsm %%The equation
Idns=solve(Eq2,Idn)
Idn = simplify(vpa(Idns), 'Steps',150)
the result was:
Idns =
Empty sym: 0-by-1
Idn =
Empty sym: 0-by-1
.

댓글을 달려면 로그인하십시오.

채택된 답변

Alan Stevens
Alan Stevens 2020년 10월 1일
You can solve it numerically using fzero.
Ism=200;
Wb=1500;
speedend=6000;
Ws=Wb:15:speedend;
Idn = zeros(size(Ws));
Idn0 = 1;
for i = 1:numel(Ws)
Idn(i) = fzero(@f,Idn0,[],Ws(i));
end
plot(Ws,Idn),grid
xlabel('Ws'),ylabel('Idn')
function F = f(Idn,Ws)
Vsm=100;
F = sqrt(Idn)+(((2.4*10.^(-5))*(Idn).^2-0.013*(Idn+3.3)*10^(-3)))*Ws/Vsm-Idn; %%The equation
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by