clear all close all filename = 'a.csv'; M = csvread(filename); sampletime = 0.005 t_max = size(M,1) * sampletime; t = linspace(0,t_max,size(M,1)); [~,M_d] = gradient( M,0.005); [~,M_dd] = gradient( M_d,0.005); figure(); subplot(3,1,1); plot (t,M); subplot(3,1,2); plot (t,M_d); subplot(3,1,3); plot (t,M_dd);