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

1 visualización (últimos 30 días)
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

Respuesta aceptada

Simon Chan
Simon Chan el 8 de Jul. de 2021
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)??

Más respuestas (1)

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

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by