How to plot smooth curve

조회 수: 12 (최근 30일)
muhammad nur
muhammad nur 2020년 12월 13일
댓글: muhammad nur 2020년 12월 14일
Y=[0:25]; %lenght (m)%
L= 25; %lenght (m)%
r1=0.043; %inner radius of pipe (m)%
r2=0.045; %outer radius of pipe (m)%
rg=0.090; %radius surrounding of ground (m)%
D=0.180; %diameter pipe (m)%
AsurL=pi*D*L; %surface area (m2)%
AsurY=pi*D*Y; %area (m2)%
Tair=34; %air temperature inlet (°C)%
Tg=24; %temperature ground (°C)%
C=1007; %specific heat air (J/kg.K)%
h=37.56; %convection of heat transfer coefficient %
Rc=1./(AsurL*h); %convection resistance%
ln=@log;
Kp=0.19; %PVC pipe Thermal conductivity (W/m.K)%
Kg=0.655; %Ground thermal conductivity (W/m.K)%
Rp=(ln((r2)/r1)./(2*pi*L*Kp)); %pipe resistance%
Rg=(ln((rg)/(r2))./(2*pi*L*Kg)); %ground resistance%
Rt=Rg+Rp+Rc; %total resistance%
U=1./Rt;
m=0.21; %mass flow rate (kg/s)%
Ty1=Tg+((Tair-Tg).*exp((-U.*AsurY)./(m.*C)));
T=Tair-Ty1;
Q=m*C*T
m=0.11; %mass flow rate (kg/s)%
Ty1=Tg+((Tair-Tg).*exp((-U.*AsurY)./(m.*C)));
T=Tair-Ty1;
Q1=m*C*T
m=0.02; %mass flow rate (kg/s)%
Ty1=Tg+((Tair-Tg).*exp((-U.*AsurY)./(m.*C)));
T=Tair-Ty1;
Q3=m*C*T
m=0.05; %mass flow rate (kg/s)%
Ty1=Tg+((Tair-Tg).*exp((-U.*AsurY)./(m.*C)));
T=Tair-Ty1;
Q4=m*C*T
plot(Y,Q,Y,Q1,Y,Q3,Y,Q4)
axis([0 25 0 2500]);
ylabel('heat transfer,Q');
xlabel('pipe length');
legend('m=0.21');Y=[0:25]; %lenght (m)%

채택된 답변

Mathieu NOE
Mathieu NOE 2020년 12월 13일
hello
simply increase the x axis points density
change the first two lines so you have now 10 more points in your curves - looks smoother
L= 25; %lenght (m)%
Y=linspace(0,L,250); %lenght (m)%
  댓글 수: 1
muhammad nur
muhammad nur 2020년 12월 14일
its work, thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by