Solving a single non-linear equation
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all, relatively new to MATLAB and just had a quick question.
I am trying to solve a non-linear equation (the Navier-Stokes Model) and am getting confused with the solve command. I wish to plot the variable v (in the equation) vs. position x, which I have already defined.
The equation is as follows:
((1 - v) / (v - a_NS)^a_Ns) = (((1 - sqrt(a_NS)) / (sqrt(a_NS) - a_NS)^(a_NS)) * exp((9/2) .* sqrt(pi/30) .* (1 - a_NS) .* M .* x));
where a_Ns, M, and x are defined above as;
a_NS = (1/4) * (1 + (3 / M^2)); M = 1.5; x = -4:1:4;
Simply trying to solve v at each of these positions and plot it.
Any help is greatly appreciated!
1 件のコメント
Karan Gill
2016 年 12 月 1 日
Can you show your code and result? Without that your question is hard to answer.
回答 (1 件)
Roger Stafford
2016 年 12 月 1 日
It is likely that ‘solve’ is unable to find v as a function of x, as is so often the case, so you would then need to use ‘fzero’ or ‘fsolve’ for specific values of x. If all you need is a plot, you can easily solve for x as a function of v and do the plot over some range of v.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!