how to solve equations
5 ビュー (過去 30 日間)
古いコメントを表示
clc,clear
%Hourly variation of climatic parameter and various temperatures (July 13, 2004)
t = [9 10 11 12 1 2 3 4] % Time is in Hour
I(t) = [366 528 704 660 639 323 167 298] % intensity is in W\m2
Ta = [31 33 34 36 36 36 35 36] % ambient temperature at diffrent time
Ti = [34.2 35.1 37.7 38.2 38.7 37.8 37.4 37.7] % temperature of air at inlet at diffrent time
v = [2.83 3.9 4.3 4.83 4.47 4.8 3.63 3.83] % velocity of air in duct at diffrent time
% diffrent parameters for calculation
ho = 5.7+3.8*v;
hi = 2.8+3*v;
alpha_c = 0.9;
bita_c = 0.83;
tau_G = 0.95;
tau = 0.9;
alpha_T = 0.5;
%(alpha*tau)eff = 0.656;
ca = 1.005;
ma = 0.002;
hc = 7.98;
hr = 3.47;
Li = 0.05;
Lc = 0.0003;
LT = 0.0005;
LG = 0.003;
Lg = 0.003;
Ki = 0.035;
Kc = 0.039;
KT = 0.033;
KG = 1;
Kg = 0.04;
b = 0.45;
L = 1.2;
UT = KT\LT;
Ut = 1\[((LG\KG)+(1\(hc+hr))+(Lg\Kg)+(1\ho))];
Ub = 1\[((Li\Ki)+1\hi)];
UtT = 1\[((1\UT)+(1\Ut))];
Ut_air = 1\[((1\UtT)+(1\hT))];
UL = Ut_air+Ub;
hp1 = UT\(Ut+UT);
hp2 = hT\(UtT+hT);
To = (((hp1*hp2*0.656*I(t)\UL)+I(t))*(1-exp(-b*UL\ma*ca)*L))+Ti*exp{(-b*UL\ma*ca)*L};
i am trying to solve for To at diffrent given value of I(t) at diffrent time. then i want to plot like the image attached.
please help me with siple method because i am new to this software and my thesis evaluation is stayed for this. thanks in advance

2 件のコメント
Star Strider
2020 年 4 月 28 日
Your Question is not at all clear.
What equations do you want to solve, and for what variables?
回答 (1 件)
Star Strider
2020 年 4 月 28 日
There were a number of errors in your code, and some may still exist. I corrected the ones I was certain of.
In this (now vectorised) code, ‘To’ is an (8x8) matrix. Be certain that you are using the mldivide,\ function correctly, and that you do not intend rdivide,/, and specifically the vectorised (element-wise) version of rdivide (./) instead:
%Hourly variation of climatic parameter and various temperatures (July 13, 2004)
t = [9 10 11 12 1 2 3 4]; %Time is in Hour
I= [366 528 704 660 639 323 167 298]; %intensity is in W\m2
Ta = [31 33 34 36 36 36 35 36]; % ambient temperature at diffrent time
Ti = [34.2 35.1 37.7 38.2 38.7 37.8 37.4 37.7]; %temperature of air at inlet at diffrent time
v = [2.83 3.9 4.3 4.83 4.47 4.8 3.63 3.83]; %velocity of air in duct at diffrent time
%diffrent parameters for calculation
ho=5.7+3.8*v;
hi=2.8+3*v;
alpha_c= 0.9;
bita_c=0.83;
tau_G=0.95;
tau=0.9;
alpha_T= 0.5;
%(alpha*tau)eff= 0.656;
ca=1.005;
ma=0.002;
hc=7.98;
hr=3.47;
Li= 0.05;
Lc= 0.0003;
LT= 0.0005;
LG=0.003;
Lg=0.003;
Ki=0.035;
Kc=0.039;
KT=0.033;
KG=1;
Kg=0.04;
b=0.45;
L=1.2;
hT = 0.5;
UT=KT\LT;
Ut=1\[((LG\KG)+(1\(hc+hr))+(Lg\Kg)+(1\ho))];
Ub=1\[((Li\Ki)+1\hi)];
UtT=1\[((1\UT)+(1\Ut))];
Ut_air=1\[((1\UtT)+(1\hT))];
UL=Ut_air+Ub;
hp1=UT\(Ut+UT);
hp2= hT\(UtT+hT);
To= (((hp1.*hp2.*0.656.*I\UL)+I).*(1-exp(-b.*UL\ma.*ca).*L))+Ti.*exp((-b.*UL\ma.*ca).*L);
figure
plot(I, To)
grid
.
7 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

