solve quadratic equation with matrix input variable
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Torsten
2022 年 6 月 29 日
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Quadratic Programming and Cone Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!