Why won't my graph show?

3 次查看(过去 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