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

1 次查看(过去 30 天)
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 中查找有关 Red 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by