clcclearT1=100; %C°
T_inf=20; %C°A=1 ; %m
%K=1 , L=.01 m , h=10
%Ts=(k*T1+h*L*T_inf)\(k+h*L)
%Q=K*A*(T1-Ts)\L ;
for h = 1:100 Ts=((1*100)+(20.*h.*.01)).\((.01.*h)+1) %from Qcond=Qconv
Q=1*1*(100-Ts)\0.01 subplot(2,2,1) , plot(h,Q,'r'), hold on ;axis([1,100,50,4000]) title(' Fig.1') xlabel('convective heat transfer coefficient (h)','fontsize',[10]) ;ylabel('Heat Transfer per unit Area (Q)') ; grid onend for k=0.1:50 Ts=((k.*100)+(10*.01*20)).\((10*.01)+k) ; Q=k.*1*(100-Ts).\0.01 subplot(2,2,2) , plot(k,Q,'b') , hold on ; title(' Fig.2') xlabel(' Thermal conductivity (k)','fontsize',[10]) ;ylabel('Heat Transfer per unit Area (Q)') ; grid on end for l=.01:.1 %mTs=((1*100)+(l.*10.*20)).\((10*l)+1) ; %from Qcond=Qconv Q=1*1*(100-Ts).\l subplot(2,2,3) , plot(l,Q,'g') , hold on ; title(' Fig.3') xlabel('wall Thickness (L)','fontsize',[10]) ;ylabel('Heat Transfer per unit Area (Q)') ; grid on end
MATLAB: What’s wrong with this code , the graphs appears empty
for loopgraph
Best Answer