How to Rescale a plot?

조회 수: 4 (최근 30일)
Angel Lozada
Angel Lozada 2023년 5월 19일
댓글: Angel Lozada 2023년 5월 19일
Hello.
I plotted a set of data (860000 samples) getting the followed plot.
The samples were taking as 10 samples per second. I would like to rescale the plot as a time lapse of 24 hours (see Fig 1).
I appreciated your help.
Regards.
unzip('Data 2.zip'),movefile('Data 2.txt','10_03_2012_Modificado.txt')
clear;
data = readmatrix('10_03_2012_Modificado.txt');
T = data(:,1);
T2 = data(:,2);
figure; % Place "figure" in this section allow to plot this data in a separate window.
plot (T,T2,'x');
title 'Emitted Signal from NAA Station';
ylabel ('Phase');
xlabel ('Samples');

채택된 답변

Walter Roberson
Walter Roberson 2023년 5월 19일
T = seconds(data(:,1));
T.Format = 'hh:mm';
Without changing anything else, this will plot the x axes using tick labels of 00:00, 05:00, 10:00, 15:00, 20:00
  댓글 수: 1
Angel Lozada
Angel Lozada 2023년 5월 19일
Walter.
Thanks for your cooperation.
I Appreciated.
Regards.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Labels and Styling에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by