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

  • Thread starter Thread starter Belginator
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion focuses on solving nonlinear equations in MATLAB, specifically for the equation E = (1/Me)*((2/(gamma+1))*(1+((gamma-1)/2)*Me^2))^((gamma+1)/(2*gamma-2)), where E is a matrix ranging from 0 to 80 and gamma is set to 1.40. The recommended approach is to utilize the MATLAB function fsolve to compute a matrix of 80 values for Me corresponding to each E value. The equation can be rearranged to facilitate the use of fsolve by expressing it in the form (E.^(1/c))/a = 1/Me + b*Me.

PREREQUISITES
  • Understanding of nonlinear equations and their forms.
  • Familiarity with MATLAB programming and syntax.
  • Knowledge of the fsolve function in MATLAB for solving equations.
  • Basic understanding of matrix operations in MATLAB.
NEXT STEPS
  • Research the fsolve function in MATLAB documentation for detailed usage.
  • Learn about nonlinear equation solving techniques in MATLAB.
  • Explore matrix manipulation functions in MATLAB to handle multiple outputs.
  • Study the implications of varying the gamma parameter on the solution.
USEFUL FOR

This discussion is beneficial for students and engineers working with MATLAB who need to solve nonlinear equations, particularly those involved in fluid dynamics or thermodynamics where such equations frequently arise.

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 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K