필터 지우기
필터 지우기

How can I plot time data so that it starts at zero seconds?

조회 수: 23 (최근 30일)
Noah Frere
Noah Frere 2016년 7월 18일
댓글: Noah Frere 2016년 7월 20일
I have an uneven time data, and I want to get it to start at t=0 instead of 3.1. Basically, I just want to shift everything over 3.1 seconds. Here is the simple code. (My actual time data is much more complicated but if you can make this work then I can apply it to my data.) Thanks, Noah
time = [3.1 4.2 5.1 6.2];
y = [5 7 4 3];
plot(time,y)

답변 (1개)

Daniel
Daniel 2016년 7월 20일
Hi Noah,
Have you tried this:
time = time - time(1);
  댓글 수: 1
Noah Frere
Noah Frere 2016년 7월 20일
Brilliant! Thanks, wish I could have figured that out for myself...

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by