Solving a single non-linear equation

2 views (last 30 days)
Ben
Ben on 1 Dec 2016
Commented: Karan Gill on 1 Dec 2016
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 Comment
Karan Gill
Karan Gill on 1 Dec 2016
Can you show your code and result? Without that your question is hard to answer.

Sign in to comment.

Answers (1)

Roger Stafford
Roger Stafford on 1 Dec 2016
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.

Categories

Find more on Systems of Nonlinear Equations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!