Error using interp1>reshapeAndSortXandV (line 424) X and V must be of the same length.
41 views (last 30 days)
Stephen23 on 9 Oct 2019
Edited: Stephen23 on 9 Oct 2019
Assuming that meas.acc.data and meas.acc.time are vectors with the same number of elements, then diff on the data vector will return a numeric vector with one element fewer than the time vector, so meas.jerk.data and meas.jerk.time will likely have mismatching sizes.
One easy solution is to take the time as the mean of adjacent time points, e.g.:
meas.jerk.time = (meas.acc.time(1:end-1) + meas.acc.time(2:end)) ./ 2;