Add folder for Matlab functions
This commit is contained in:
20
src/voltageToDisplacementL22.m
Normal file
20
src/voltageToDisplacementL22.m
Normal 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);
|
||||
Reference in New Issue
Block a user