我有一个从车辆收集的加速度数据。我也有位移测量。
我想根据测量的加速度数据计算位移矢量,但还没有成功。
这是数据(之前的链接不起作用我更新了链接): 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)
但位移矢量应该是波浪形的,而不是线性增量。
我哪里错了?


