# How can i solve these equations in Matlab?

• MATLAB
• koii123
In summary, Equation 1: Equation 2: Equation 3: Equation 4: Equation 5:The individual is trying to solve for the unknowns α, α*, p, η0, ηR, θ0, θr, but is having trouble getting started. They have tried to solve for p, η0, ηr, θ0, θr, but have not been successful. They ask for help from someone who can offer step-by-step instructions on how to solve for the α, α*, p, η0, ηR, θ0, θr. Once the individual
koii123
Equation 1:

Equation 2:

Equation 3:

Equation 4:

Equation 5:

I would like to solve
, (not the one with a star)
and i want to define values for p, η0, ηr, θ0, θr.
i have tried to solve them, but didn't work,
can someone please help and show me step by step?

Last edited:
What exactly are you trying to do? I count 10 unknowns (α, α*, p, η0, ηR, θ, θ0, S0, Z, β), and only 5 equations. So the system is underdetermined and there are an infinite number of possible solutions. You either need to fix some of the values or find more equations until the number of equations equals the number of unknowns. What exactly have you tried so far?

phyzguy said:
What exactly are you trying to do? I count 10 unknowns (α, α*, p, η0, ηR, θ, θ0, S0, Z, β), and only 5 equations. So the system is underdetermined and there are an infinite number of possible solutions. You either need to fix some of the values or find more equations until the number of equations equals the number of unknowns. What exactly have you tried so far?
Actually, i have values for p, η0, ηr, θ0, θr,
for example:
p=101325,
η0=4.43,
ηr=0.181,
θ0=313.15,
θr=373.15,
also, as you can see, it is possible to solve α , because these 5 equations can be combined into 1

OK, that makes more sense. So can you do the following?

(1) Solve equation 4 for the ratio β/S0.
(2) Divide equation 5 by S0 to get β/S0 on the LHS. Then plug the result from step 1 into this and solve this equation for Z.
(3) Take the result from step 2 and plug it into equation 3, then solve this equation for α.

Edit:

Actually, I see now that it is even simpler than that. You can combine equations 4 and 5 to give:

(1+5.1E-9*p)^Z = 1

Solve this for Z and plug it into equation 3 to give α.

Last edited:
Looking more at your equations. Equations 4 and 5 together imply that:

(1+5.1E-9*p)^Z = 1

Since p = 101325, (1+5.1E-9*p) = 1.0005, so this equation is only satisfied for Z = 0. Equation 3 then implies that α=0. Are you sure this is all correct, or am I missing something?

## 1. How do I input equations into Matlab?

To input equations into Matlab, you can either type them directly into the command window or create a script file and save it with the ".m" extension. In the script file, use the "syms" command to create symbolic variables, and then write your equations using these variables.

## 2. How can I solve a system of equations in Matlab?

In order to solve a system of equations in Matlab, you can use the "solve" function. This function takes in the equations and the variables you want to solve for as inputs, and returns the solutions in the form of a structure. If there are multiple solutions, they will be listed in an array.

## 3. What is the difference between "solve" and "fsolve" in Matlab?

The "solve" function in Matlab can only handle algebraic equations, while "fsolve" is used for solving non-linear equations. "fsolve" uses numerical methods to find the solution, while "solve" uses symbolic manipulation. Additionally, "fsolve" requires an initial guess for the solution, while "solve" does not.

## 4. Can I solve differential equations in Matlab?

Yes, you can solve differential equations in Matlab using the "ode45" function. This function uses numerical methods to solve ordinary differential equations (ODEs) and returns the solution as an array. You will need to provide the differential equation, initial conditions, and the time interval for which you want to solve the equation.

## 5. How can I plot the solutions to my equations in Matlab?

To plot the solutions to your equations in Matlab, you can use the "ezplot" function. This function takes in the equation, the range of values for the independent variable, and the variable you want to plot against as inputs, and generates a graph of the solution. You can also use the "plot" function to plot individual points from your solution array.

• MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
380
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K