I have an acceleration data which is collected from a vehicle. I do also have a displacement measurement.
I would like to calcuate the displacement vector from the measured acceleration data, but no success yet.
Here is the data (the previous link was not working I updated the link): https://ufile.io/zyw3r
filename = ('acc_time.csv');
accdata = csvread('acc_time.csv');
[mydata, myheader] = xlsread(filename);
for i = 1:length(myheader)
% compose a command to assign each column to a variable with the same
% name as the header
commandExec = [myheader{i}, ' = ', 'mydata(:,', num2str(i) , ');'];
% execute the composed command to actually create the variable
evalin('base', commandExec );
end
vel_vector = cumtrapz(time,acc);
disp_vector= cumtrapz(time,vel_vector);
plot(time, disp_vector)
but the displacement vector should be squiggy not like linear incremental.
Where am I wrong?