0

I geht this error message when I try to derive my acceleration of the car. I think there is a size problem, but I don't know how to solve it. The data is measured from a car.

meas.jerk.data = diff(meas.acc.data);
meas.jerk.time = meas.acc.time;

I think I have to do something like this but I really don't know.

size(diff(meas.acc.data)) = size(meas.acc.data)
  • What are you trying to do? Your question seems vague and incomplete. The statement size(diff(meas.acc.data)) = size(meas.acc.data) makes no sense, as you use the assignment operarator = to the size function. An equality comparison is made with ==, but size returns an array. Also, what you mean by derive? Numerical differentiation? Or do you have the acceleration already on the meas.acc.data variable? What you want to do? – Thales Oct 9 '19 at 10:31
  • I want to plot the jerk from the acceleration. I know that diff(meas.acc.data) looses one dimension from his size and thats why its not correct. – Shalomi11 Oct 9 '19 at 13:24
  • Check the gradient function. Aproximate your derivative with a finite difference, jerk=grad(acceleration)./grad(time) – Thales Oct 9 '19 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.