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

1 view (last 30 days)
Aijalon Marsh on 13 Oct 2023
Edited: Star Strider on 13 Oct 2023
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));
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 on 13 Oct 2023
Edited: Star Strider on 13 Oct 2023
It does. It just uses the exponent to scale it.
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));
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
.

KSSV on 13 Oct 2023
clc; clear all ;
% url = 'https://www.ioc-sealevelmonitoring.org/list.php?operator=&showall=all&output=contacts#' ;
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));
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)