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 Center および File ExchangeThermal Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by