필터 지우기
필터 지우기

How to turn datapoints into hours?

조회 수: 1 (최근 30일)
Rebecca Ellis
Rebecca Ellis 2018년 9월 2일
편집: Rebecca Ellis 2018년 9월 2일
I have 200 datapoints which I need to turn into 50 hours, trying to replicate the picture attached. What is the best way or function for doing this?
  댓글 수: 1
madhan ravi
madhan ravi 2018년 9월 2일
what have you tried so far??

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

답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 2일
t = (1:200)/50;
plot(t, y)
  댓글 수: 1
Rebecca Ellis
Rebecca Ellis 2018년 9월 2일
편집: Rebecca Ellis 2018년 9월 2일
Thank you for this answer - I was trying to use the date time function - as I need to see the hour when I zoom into the figure eg. picture
I was trying
ticlocs =
datetime(DateString);
ticlocs.Format = 'HH-MM';
set(gca, 'XTick', ticklocs);
But this is better- I was trying for a more automated way as I have lots of datasets at different lengths to convert to hours.

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

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by