# MATLAB: How to solve this equation Numerically [VPASOLVE]

equationnumerical equationsolvesymbolicsymsvpasolve

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?

#### Best Answer

• 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));endplot(Ws,Idn),gridxlabel('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    ``