29 lines
657 B
Matlab
29 lines
657 B
Matlab
% getGroundDisplacement
|
|
% :PROPERTIES:
|
|
% :header-args:matlab+: :tangle getGroundDisplacement.m
|
|
% :header-args:matlab+: :comments org :mkdirp yes
|
|
% :header-args:matlab+: :eval no :results none
|
|
% :END:
|
|
% <<sec:getGroundDisplacement>>
|
|
|
|
% This Matlab function is accessible [[file:getGroundDisplacement.m][here]].
|
|
|
|
|
|
function [time, displacement] = getGroundDisplacement()
|
|
% getGroundDisplacement -
|
|
%
|
|
% Syntax: [time, displacement] = voltageToVelocityL22()
|
|
%
|
|
% Inputs:
|
|
% - -
|
|
%
|
|
% Outputs:
|
|
% - time - in [s]
|
|
% - displacement - in [m]
|
|
s = zpk('s');
|
|
|
|
[time, velocity] = getGroundVelocity();
|
|
|
|
displacement = lsim(1/s, velocity, time);
|
|
end
|