How Can I Solve Three Equations with Three Unknowns in Matlab?

  • Context: MATLAB 
  • Thread starter Thread starter gdogg123
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion focuses on solving three equations with three unknowns in Matlab, where two equations are algebraic and one is a differential equation. The equations involve parameters such as heat transfer and temperature dynamics, specifically using the variables Ttank, Toutc, and Toutw. A key recommendation is to linearize the differential equation using Fourier series and neglect higher-order terms to facilitate solving the system in Matlab. The user seeks guidance on both the implementation in Matlab and plotting the variable Toutw against time.

PREREQUISITES
  • Understanding of Matlab programming and syntax
  • Familiarity with differential equations and their linearization
  • Knowledge of Fourier series and their application in solving equations
  • Basic concepts of heat transfer and thermodynamics
NEXT STEPS
  • Learn how to implement differential equations in Matlab using the 'ode45' function
  • Study the process of linearizing differential equations for easier computation
  • Research how to plot data in Matlab, specifically using the 'plot' function
  • Explore the application of Fourier series in engineering problems
USEFUL FOR

Engineers, physicists, and students working with thermal systems, as well as Matlab users looking to solve complex equations involving multiple variables and differential equations.

gdogg123
Messages
3
Reaction score
0
Hello, I`m having trouble solving equations simultaneously in Matlab. I have three equations and three unknowns. Two equations are algebraic and one is a differential equation. Here are my three equations, any help would be appreciated:

1. (0.3*1.06*3348*Ttank)-(0.3*1.06*3348*Toutc)+(20*200*(sin(t/24*3.14))^8=0

2. (0.041*4418*20)-Toutw*4418*0.041+1000*((Ttank-20)-(Ttank-Toutw))/ln(Ttank-20)/(Ttank-Toutw)

3. 1.06*3348*1.5* dTtank/dt=0.03*1.06*3348*Toutc-0.03*1.06*3348*Ttank-1000*((Ttank-20)-(Ttank-Toutw))/ln(Ttank-20)/(Ttank-Toutw)

t is time and will simulate from 0 until 300. Intial condition for Ttank(0)= 40, so Ttank at 0 is equal to 40. Please I need help urgently. How can this be written in Matlab and how can we plot Toutw against t (time)? I would really appreciate any help.
 
Physics news on Phys.org
For "n equations in n unknowns" to be solvable, the equations need to be linear. Your last one clearly isn't.

I suggest you should start by linearizing your differential equation. Take the Fourier series and neglect higher-order terms. Then we can look at how to use Matlab to solve this thing.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K