Why won't my graph show?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
%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')
0 Kommentare
Akzeptierte Antwort
KSSV
am 21 Sep. 2020
Bearbeitet: KSSV
am 21 Sep. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!