Solution of implicit function
26 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have an equation for example x^2+y^2-16=0 . How can I get all of x and y value for this equation. Of course I can write it y=sqrt(16-x^2). But what if this equation is more complex. I tried something with solve command on matlab but i didn't achive. can u help me?
2 件のコメント
Matt J
2016 年 1 月 25 日
How can I get all of x and y value for this equation.
There are infinite pairs x,y that solve your example equation. I think you really mean, "how can I get y for a given x?"
回答 (1 件)
Matt J
2016 年 1 月 25 日
編集済み: Matt J
2016 年 1 月 25 日
If analytical solutions exist, then SOLVE would be the thing to use.
If analytical solutions don't exist, then you would have to search numerically for a solution using FZERO or FSOLVE.
6 件のコメント
Walter Roberson
2016 年 1 月 26 日
c = rand; s90 = rand; p = rand; q = rand; sb = rand; su = rand; %in other words you need numeric values for them
syms s1 s2
eqn = s1^2/s0^2-c*s1*s2/s0/s90+s2^2/s90^2+((p+q)-(p*s1+q*s2)/sb)*s1*s2/s0/s90-su^2;
sols = solve(eqn, s1);
f1 = matlabFunction(sols(1), s2);
f2 = matlabFunction(sols(2), s2);
S2 = linspace(-50,50);
plot(S2, f1(S2), S2, f2(S2));
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!