I am developing for loop for importing the data from excel and plotting but I am getting confusion in changing the colors ...How should I change the color also for did condition i,e for first red , second blue and so on ...I tried to used 2 for loops one for color and one for loading file....Can someone please help me in this ..thank you in advance
e=xlsread(' all values.xlsx');
time=Temps';
subplot(1,3,1)
for m= 1:3
plot(time,e(:,m));
hold on
xlim([0 200])
xlabel('time')
ylabel('CHC emission')
end

댓글 수: 5

Have a look on below link to know more
col=['r' 'g' 'b'];
x = 1:1:10;
y = [1:1:10;1:10:100;1:5:50];
for i = 1:3
plot(x,y(i,:),'color',col(i));hold on
end
Prasad Joshi
Prasad Joshi 2022년 1월 28일
편집: Prasad Joshi 2022년 1월 28일
Sir one for loop is for loading the excel data I am using and then plotting from excel file for eg 10 cases ...But for color plot i used for loop again its not running ...can you please guide sir in this ..Thank you in advace
Ankit
Ankit 2022년 1월 28일
can you post the code? It is not clear for me when you say its not running? Are you facing some issues/error?
Prasad Joshi
Prasad Joshi 2022년 1월 28일
Sir the code work Thank you there was error on my side sorry sir ...Thnk you once again for your help
Prasad Joshi
Prasad Joshi 2022년 2월 10일
편집: Prasad Joshi 2022년 2월 10일

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

질문:

2022년 1월 28일

편집:

2022년 2월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by