필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
TIERNAN BURKE
TIERNAN BURKE 2021년 7월 8일
댓글: TIERNAN BURKE 2021년 7월 8일
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