Why won't my plot start 0 and increase to 0.005 like my Ld

조회 수: 1 (최근 30일)
Aijalon Marsh
Aijalon Marsh 2023년 10월 13일
편집: Star Strider 2023년 10월 13일
Ld=(0:0.001:0.005);
w=0.001;
L=0.007;
P=4*0.001;
Ta=25;
h=375;
Kf=175;
Kd=0.032;
Tb=75;
Ap=3.02*10^-3;
N=238;
Ac=10^-6;
m=92.6;
Lf=L-Ld;
Rtf=(cosh(m.*Lf)+(h./(m.*Kf)).*sinh(m.*Lf))./(sqrt(4*h.*(w)^3*Kf).*(sinh(m.*Lf)+h./(m.*Kf)).*cosh(m.*Lf));
R_fins=Rtf/N;
Rf_cond=Ld/(Kf*N*Ac);
Rd_cond=Ld/(Kd*(Ap-N*Ac));
Ad=Ld./(Kd*Rd_cond);
R_conv=1./(h*Ad);
q=(Tb-Ta)./(Rd_cond+R_conv)+(Tb-Ta)./(Rf_cond+R_fins);
figure
plot(Ld, q, 'o-');
xlabel('Dust layer thickness, Ld (m)');
ylabel('Heat Rate, q(W)');
grid on;
fprintf("Total heat rate %.2f°C", q);

채택된 답변

Star Strider
Star Strider 2023년 10월 13일
편집: Star Strider 2023년 10월 13일
It does. It just uses the exponent to scale it.
Add these lines:
Ax = gca;
Ax.XAxis.Exponent = 0;
to see the tick labels as more obvious decimal fractions, as I did here —
Ld=(0:0.001:0.005);
w=0.001;
L=0.007;
P=4*0.001;
Ta=25;
h=375;
Kf=175;
Kd=0.032;
Tb=75;
Ap=3.02*10^-3;
N=238;
Ac=10^-6;
m=92.6;
Lf=L-Ld;
Rtf=(cosh(m.*Lf)+(h./(m.*Kf)).*sinh(m.*Lf))./(sqrt(4*h.*(w)^3*Kf).*(sinh(m.*Lf)+h./(m.*Kf)).*cosh(m.*Lf));
R_fins=Rtf/N;
Rf_cond=Ld/(Kf*N*Ac);
Rd_cond=Ld/(Kd*(Ap-N*Ac));
Ad=Ld./(Kd*Rd_cond);
R_conv=1./(h*Ad);
q=(Tb-Ta)./(Rd_cond+R_conv)+(Tb-Ta)./(Rf_cond+R_fins);
figure
plot(Ld, q, 'o-');
xlabel('Dust layer thickness, Ld (m)');
ylabel('Heat Rate, q(W)');
grid on;
fprintf("Total heat rate %.2f°C\n", q);
Total heat rate NaN°C Total heat rate 113.83°C Total heat rate 90.02°C Total heat rate 70.66°C Total heat rate 53.56°C Total heat rate 37.54°C
Ax = gca;
Ax.XAxis.Exponent = 0; % <— ADDED
.

추가 답변 (1개)

KSSV
KSSV 2023년 10월 13일
clc; clear all ;
% url = 'https://www.ioc-sealevelmonitoring.org/list.php?operator=&showall=all&output=contacts#' ;
% T = webread(url);
Ld=(0:0.001:0.005);
w=0.001;
L=0.007;
P=4*0.001;
Ta=25;
h=375;
Kf=175;
Kd=0.032;
Tb=75;
Ap=3.02*10^-3;
N=238;
Ac=10^-6;
m=92.6;
Lf=L-Ld;
Rtf=(cosh(m.*Lf)+(h./(m.*Kf)).*sinh(m.*Lf))./(sqrt(4*h.*(w)^3*Kf).*(sinh(m.*Lf)+h./(m.*Kf)).*cosh(m.*Lf));
R_fins=Rtf/N;
Rf_cond=Ld/(Kf*N*Ac);
Rd_cond=Ld/(Kd*(Ap-N*Ac));
Ad=Ld./(Kd*Rd_cond);
R_conv=1./(h*Ad);
q=(Tb-Ta)./(Rd_cond+R_conv)+(Tb-Ta)./(Rf_cond+R_fins);
figure
plot(Ld, q, 'o-');
xlabel('Dust layer thickness, Ld (m)');
ylabel('Heat Rate, q(W)');
grid on;
fprintf("Total heat rate %.2f°C\n", q);
Total heat rate NaN°C Total heat rate 113.83°C Total heat rate 90.02°C Total heat rate 70.66°C Total heat rate 53.56°C Total heat rate 37.54°C
str = cell(length(Ld),1) ;
for i = 1:length(Ld)
str{i} = num2str(Ld(i)) ;
end
xticks(Ld)
xticklabels(str)

카테고리

Help CenterFile Exchange에서 Thermal Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by