Plot function and hold on feature not plotting one of my graphs

1 次查看(过去 30 天)
Hey my first plot is not coming up on my firgure although when i plot it by itself it works fine. I am not sure why this any help would be great.
clc
clear
load data_1500rpm.mat
load data_1930rpm.mat
load data_2360rpm.mat
otime= data_1500rpm{:,1};
time= otime((1:9576));
%% Average Condensor Temp
CT1500 = data_1500rpm{:,[4 7 10 13 16 21]};
Mean_CT1500 = mean(CT1500,2);
CT1930 = data_1930rpm{:,[4 7 10 13 16 21]};
Mean_CT1930 = mean(CT1930,2);
CT2360 = data_2360rpm{:,[4 7 10 13 16 21]};
Mean_CT2360 = mean(CT1500,2);
plot (time,Mean_CT1500(1:9576),"Color","r")
hold on
plot (time,Mean_CT1930,"Color","b")
plot (time,Mean_CT2360(1:9576),"Color","g")
hold off
legend("1500RPM","1930RPM","2360RPM","Location","Best")
grid on

采纳的回答

Simon Chan
Simon Chan 2021-7-8
Seems Mean_CT1500 & Mean_CT2360 are the same, so they overlap to each other.
Mean_CT1500 = mean(CT1500,2);
Mean_CT2360 = mean(CT1500,2); <--- should be mean(CT2360,2)??

更多回答(1 个)

KSSV
KSSV 2021-7-8
It looks like your red curve is in exact match with blue one. Try using different markers to confirm it.

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by