Connecting plots of time series from a matrix data set?

조회 수: 1 (최근 30일)
Fercho_Sala
Fercho_Sala 2021년 6월 29일
답변: Fercho_Sala 2021년 7월 2일
Hello everyone, probably is an easy question,,, but with a matrix of 62(days)x48(sample points each one) as the one is attached, How can I plot this as day per day in one graphic? (62 intervals) Being x axis the day number. Thank you.

채택된 답변

Scott MacKenzie
Scott MacKenzie 2021년 6월 29일
편집: Scott MacKenzie 2021년 6월 29일
I assume you're expecting a lot of clutter, since you are plotting 48 points for each of 62 days. Just use
plot(SS48h)
Here's the result with your data:
  댓글 수: 2
Fercho_Sala
Fercho_Sala 2021년 6월 29일
편집: Fercho_Sala 2021년 6월 29일
@Scott MacKenzie every day has 48 samples, is it possible to plot each day independently in the general plot? , I know it will be a huge graphic, but this is the idea. For example the day number 12 looks like this:
then, the day number 13, 14, and so on...
Scott MacKenzie
Scott MacKenzie 2021년 6월 29일
편집: Scott MacKenzie 2021년 6월 29일
Well, there are a variety of possibilities. Here's one...
% your data in M
tiledlayout('flow');
n = size(M,1);
for i=1:n
nexttile;
plot(M(i,:));
set(gca,'ylim',[0 10]);
title(sprintf('Day %d',i));
end

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

추가 답변 (1개)

Fercho_Sala
Fercho_Sala 2021년 7월 2일
@Scott MacKenzie Thank you, this is the correct script !

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by