How Do You Solve Nonlinear Equations in Matlab for Multiple Outputs?

  • Thread starter Thread starter Belginator
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
To solve the nonlinear equation E = (1/Me)*((2/(gamma+1))*(1+((gamma-1)/2)*Me^2))^((gamma+1)/(2*gamma-2)) in MATLAB for multiple outputs, the function fsolve is suggested as a potential solution method. The equation can be rearranged to isolate Me, leading to a form that can be solved numerically. It is important to define the parameters correctly, particularly the matrix of E values and the constant gamma. Users are encouraged to perform additional algebraic manipulation to facilitate the solution process. Proper implementation of these steps should yield a matrix of 80 Me values corresponding to the E values.
Belginator
Messages
12
Reaction score
0

Homework Statement



Ok I have an equation:

E = (1/Me)*((2/(gamma+1))*(1+((gamma-1)/2)*Me^2))^((gamma+1)/(2*gamma-2));

Where is E is a matrix of [0:1:80] and gamma is known as 1.40.

What function do I use to solve for Me? I need to find a matrix of 80 values of Me each corresponding to the E value.

I have no idea what to use, I was going along the lines of fsolve, but I just don't know, any help would be very much appreciated.
 
Physics news on Phys.org
Belginator said:

Homework Statement



Ok I have an equation:

E = (1/Me)*((2/(gamma+1))*(1+((gamma-1)/2)*Me^2))^((gamma+1)/(2*gamma-2));

Where is E is a matrix of [0:1:80] and gamma is known as 1.40.

What function do I use to solve for Me? I need to find a matrix of 80 values of Me each corresponding to the E value.

I have no idea what to use, I was going along the lines of fsolve, but I just don't know, any help would be very much appreciated.
Your equation is of the form
E = 1/Me*a*(1+b*Me^2)^c
So
(E.^1/c)/a = 1/Me +b*Me
Now, you should do some work.
 

Similar threads

Replies
1
Views
2K
Replies
3
Views
1K
Replies
1
Views
2K
Replies
10
Views
2K
Replies
18
Views
3K
Replies
2
Views
1K
Replies
10
Views
2K
Back
Top