solve quadratic equation with matrix input variable
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to solve a 4th order quadratic equation with the input variable in matrix form, as follows:
N =2000:-50:0;
eqn=((((1.3+(((17.5).*P)./(P+N./20))).^2)+((0.036.*P).^2)).^0.5)-18.5 ==0;
P =double(vpasolve(eqn,2));
This error message is coming:
Undefined function 'vpasolve' for input arguments of type 'double'.
Error in code (line 24)
P =double (vpasolve(eqn,2));
0 Commenti
Risposta accettata
Torsten
il 29 Giu 2022
syms P
N =2000:-50:50;
guess = 2;
for i=1:numel(N)
n = N(i);
eqn=((((1.3+(((17.5).*P)./(P+n./20))).^2)+((0.036.*P).^2)).^0.5)-18.5 ==0;
sol = vpasolve(eqn,guess);
p(i) =double(sol);
guess = p(i);
end
p
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Quadratic Programming and Cone Programming in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!