How to include both Fixed and unknown values in fsolve
古いコメントを表示
I am wanting to solve a system of equations for 2 unknowns and 1 "fixed" value. I have read through Matt's Answer here but am even more confused on how to do so. Here is the code. x and y are my unknowns and u is a "fixed" value.
r=[1 2];
u= 5;
guess=[1,1];
output= fsolve(myfun(r,u),guess);
function F=myfun(r,u)
x = r(1);
y = r(2);
F(1)=x+5*y^2+u;
F(2)=x^2+4*y+u;
end
Cheers,
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!