MATLAB: Simultaneous Equations – Any help ASAP is greatly appreciated!

simultaneous equationssolve

Hi I have a problem using the solve command to get an answer to the following 2 equation sim equation. I think my syntax is correct however…:
alpha=0.9
G=800
Tinf=313
h1=10
Te=293
Te2=313
h2=2
k=0.115
t=0.1
epsilon=5.87*10^-8
sigma=0.9
[T1,T2]=solve('alpha*G-h1*(T1-Tinf)-sigma*epsilon*(T1^4-Te^4)=(k(T1-T2)/t)','h2*(T2-Tinf)+sigma*epsilon*(T2^4-Te2^4)=(k(T1-T2)/t)')
I get a rearrangement of the formula out…I am not sure why. I know I should get an answer for temps T1 and T2,
Many Thanks!

Best Answer

[T1,T2]=solve(alpha*G-h1*(T1-Tinf)-sigma*epsilon*(T1^4-Te^4)-(k(T1-T2)/t),h2*(T2-Tinf)+sigma*epsilon*(T2^4-Te2^4)-(k(T1-T2)/t));
Or alternately,
[T1,T2]=solve(subs('alpha*G-h1*(T1-Tinf)-sigma*epsilon*(T1^4-Te^4)=(k(T1-T2)/t)'),subs('h2*(T2-Tinf)+sigma*epsilon*(T2^4-Te2^4)=(k(T1-T2)/t)'))