Solving a single non-linear equation
3 次查看(过去 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!