Add folder for Matlab functions

This commit is contained in:
2019-05-14 16:58:45 +02:00
parent 0ead56a3a1
commit 627859f026
3 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
function [disp] = voltageToDisplacementL22(voltage, time, gain)
% voltageToDisplacementL22 -
%
% Syntax: [disp] = voltageToDisplacementL22(voltage, time, gain)
%
% Inputs:
% - voltage - Measured voltage
% - time - Time vector
% - gain - Gain of the voltage amplifier in dB
%
% Outputs:
% - disp -
s = zpk('s');
voltage = voltage - mean(voltage);
velocity = voltageToVelocityL22(voltage, time, gain);
disp = lsim(1/s, velocity, time);