필터 지우기
필터 지우기

Does a way exists to get the results of the retime function in matlab 2015b??? Any help would be great!!!

조회 수: 3 (최근 30일)
I'm trying to have one monotonic time created taking the end of the 1st cell of time data and continuing on until the last cell time data as one continous time. the frequency = 0.055;
(e.g. last cell data of cameraTime{1,1} = 3.2969e+03; cameraTime{1,2} = 3.2969e+03 + 0.055 and continue with the size of time data in the remaining cells to create one time for all the total cells.)

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 24일
create cell arrays in which the camera time is the first column and the data corresponding to that time is in the other columns. cell2mat() those together into one big matrix and sort() on time.
Create a vector of times from the first to ceil((last-first)/0.055)*0.055+first at intervals of 0.055
Now do interp1() over the arrays, original time values as the x values, vector with consistent offset as the x values to query at.
  댓글 수: 9
Walter Roberson
Walter Roberson 2018년 4월 27일
duration of cycle is 4400. You could use duration objects in this matter, or you could just leave everything numeric. As in
4399.989
4399.9945
0.0
0.0055
going to
4499.989
4399.9945
4400.0
4400.0055
Brandon Leonard
Brandon Leonard 2018년 4월 30일
Thanks Walter for your time. I didn't exactly use your answer but it put me on a path to find a suitable solution. By taking the difference of times (cam{i}) I was able to add the iterations by adding the end number to dt because the first position in column is zero. I will gladly accept your answer because you are a great help!!
dX1 = 0; dt = 0.055
for i = 1:segment
cam{i} = (cameraTime{i}-cameraTime{i}(1));
cam{i} = cam{i} + dX1;
camRT{i} = cam{i};
dX1 = cam{i}(end,1) + dt;

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by