Two Non-Linear Equations, Two unknowns
1 次查看(过去 30 天)
显示 更早的评论
So, I think this is that easy. Two non-linear equations, two unknowns. I know I once knew how to do this, but now I don't seem to be able to do it. I tried the min command, but that's just for arrays. I tried fsolve(E1,E2) which didn't work because it wants "double". Fminbnd didn't work either, I think because it can't handle two functions. I know my answer should be around Ts=290 and Ta=250, ish. It's just a simple command somewhere, but I can't find it. Any help would be appreciated. Thanks for taking the time!
alphaS=0.11; ta=0.53; alphaA=0.3; tprimea=0.06; alphaprimea=0.31;
C=2.5;
So=6.28e7; %Solar Constant, p.110
sigma=5.67e-8; %Boltzman's Constant, p. 110
%syms Ta Ts
E1=@(Ts,Ta)ta*(1-alphaS)*So/4-C*(Ts-Ta)-sigma*Ts^4*(1-alphaprimea)+...
sigma*Ta^4;
E2=@(Ts,Ta)(1-alphaA-ta*(1-alphaS))*So/4+C*(Ts-Ta)+sigma*Ts^4*...
(1-tprima-alphaprimea)-2*sigma*Ta^4;
0 个评论
采纳的回答
Star Strider
2015-9-21
One problem is a typo in ‘E2’, where there’s an ‘e’ wanting in ‘tprima’. With that and creating ‘E1E2’ from both functions:
alphaS=0.11; ta=0.53; alphaA=0.3; tprimea=0.06; alphaprimea=0.31;
C=2.5;
So=6.28e7; %Solar Constant, p.110
sigma=5.67e-8; %Boltzman's Constant, p. 110
E1=@(Ts,Ta)ta*(1-alphaS)*So/4-C*(Ts-Ta)-sigma*Ts^4*(1-alphaprimea)+...
sigma*Ta^4;
E2=@(Ts,Ta)(1-alphaA-ta*(1-alphaS))*So/4+C*(Ts-Ta)+sigma*Ts^4*...
(1-tprimea-alphaprimea)-2*sigma*Ta^4;
E1E2 = @(B) [E1(B(1),B(2)); E2(B(1),B(2))];
B0 = [290; 250];
TsTa = fsolve(E1E2, B0)
TsTa =
4.5604e+003
3.5995e+003
Since this may not be the result you want, you may need to experiment with it, particularly with respect to a different ‘B0’. (This code assumes both equations equate to zero, as fsolve requires.)
4 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!