标签:crete and with 技术 inf app src alt The
backgound: post processing of VIV
goal: to get y‘ and y‘‘
input data:
output:
y‘ vs time, and y‘‘ vs time
Matlab code
1 clc; 2 clear; 3 data=xlsread(‘gap1Ur8.xlsx‘); 4 t=data(1000:2000,1); % time 5 dt= 0.005; 6 y=data(1000:2000,2); % displacement, 2nd column in the input data 7 der_y=diff(y)./dt; % y‘=dy/dt, i.e. 1st derivative 8 der_y_2 = diff(der_y)./dt; % y‘‘, i.e. 2nd derivative of y 9 plot( data(1002:2000,1), der_y_2, ‘k‘,data(1001:2000,1), der_y,‘r‘,t, y, ‘b‘);
approximate derivate with difference for a discrete data in matlab
标签:crete and with 技术 inf app src alt The
原文地址:https://www.cnblogs.com/code-saturne/p/11415231.html