Solving a single non-linear equation

3 次查看(过去 30 天)
Ben
Ben 2016-12-1
评论: Karan Gill 2016-12-1
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
Karan Gill 2016-12-1
Can you show your code and result? Without that your question is hard to answer.

请先登录,再进行评论。

回答(1 个)

Roger Stafford
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.

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by