Why won't my graph show?

1 回表示 (過去 30 日間)
Kara Scully
Kara Scully 2020 年 9 月 21 日
編集済み: KSSV 2020 年 9 月 21 日
%all of the variables except R0 are parameters I change
% The format for the list worked in a different plot
%not sure why it is not working now
clear;
clc;
T1=500;
T0=300;
R1=.10;
R0=(.1:.01:1);
h=100;
k=.05;
qoverL=(2*pi*(T1-T0))/((log(R0/R1)/k)+(1/h*R0));
plot(R0,qoverL);
xlabel('R0')
ylabel('q/L')
title('Heat lost vs R0')

採用された回答

KSSV
KSSV 2020 年 9 月 21 日
編集済み: KSSV 2020 年 9 月 21 日
Read about element by element operations. You need to use ./ in the line which shows error.
%all of the variables except R0 are parameters I change
% The format for the list worked in a different plot
%not sure why it is not working now
clear;
clc;
T1=500;
T0=300;
R1=.10;
R0=(.1:.01:1);
h=100;
k=.05;
qoverL=(2*pi*(T1-T0))./((log(R0/R1)/k)+(1/h*R0)); % <----here use ./ as R0 is array
plot(R0,qoverL);
xlabel('R0')
ylabel('q/L')
title('Heat lost vs R0')

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by