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

  • Thread starter Thread starter gdogg123
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion revolves around solving three simultaneous equations in MATLAB, which include two algebraic equations and one differential equation. The equations involve variables such as Ttank, Toutc, and Toutw, with Ttank having an initial condition of 40 at time t=0. A key point raised is that for "n equations in n unknowns" to be solvable, the equations must be linear, which is not the case with the provided differential equation. To address this, it is suggested to linearize the differential equation by using a Fourier series and neglecting higher-order terms. The conversation emphasizes the need for a structured approach to implement the equations in MATLAB and plot the relationship of Toutw against time.
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.
 
Back
Top