Scalling MATLAB Distance Velocity

조회 수: 1 (최근 30일)
T
T 2013년 3월 4일
Suppose I have the following two time vectors vectors
t2 = 4 4 4 5 5 5 6 6 6 7 7 7
and t1 = 1 2 3 4 5 6 7 8 9
I know the velocity is 1 m/s.
How can I scale t2 and t1? In other words, how can I set the first t2(1) = t1(1) ?
  댓글 수: 5
Jan
Jan 2013년 3월 5일
There is still the confusing t4 in the questions. Please, Anthony, edit the question and either fix or explain this.
T
T 2013년 3월 5일
Sorry.

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

채택된 답변

Image Analyst
Image Analyst 2013년 3월 4일
If t1 and t2 are two different ranges of your time axis, then why does t2 have repeated values? And what is the name of your velocity vector that corresponds to t1? If you have that velocity vector and t1, then you can get the velocity vector interpolated for the times in t2 using interp1():
velocity2 = interp1(t1, velocity1, t2);
  댓글 수: 12
Image Analyst
Image Analyst 2013년 3월 6일
If t2 has unique times, then the code I originally gave you will work.
T
T 2013년 3월 8일
편집: T 2013년 3월 8일
It looks like scaling didn't get me the result I would like and I don't think synchronize would either.
I have given some thought of binning the data.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by