nass-micro-station-measurem.../Ground Motion/convert_txt_to_mat.m

25 lines
700 B
Mathematica
Raw Normal View History

2019-03-14 16:40:28 +01:00
%%
clear; close all; clc;
%%
% 1st column is frequency in Hz
% Then PSD's in (um/s)^2/Hz) for the x,y,z axis respectively.
%%
data = table2array(readtable('id31_camac_floor_PSD_october2014.txt'));
%%
gm.freqs = data(:, 1);
gm.psd_vx = 1e-12*data(:, 2); % [(um/s)^2/Hz] => [(m/s)^2/Hz]
gm.psd_vy = 1e-12*data(:, 3); % [(um/s)^2/Hz] => [(m/s)^2/Hz]
gm.psd_vz = 1e-12*data(:, 4); % [(um/s)^2/Hz] => [(m/s)^2/Hz]
gm.psd_dx = gm.psd_vx./(2*pi*gm.freqs); % velocity to displacement [m^2/Hz]
gm.psd_dy = gm.psd_vy./(2*pi*gm.freqs); % velocity to displacement [m^2/Hz]
gm.psd_dz = gm.psd_vz./(2*pi*gm.freqs); % velocity to displacement [m^2/Hz]
%%
save('../../Matlab/data/signals/gm_esrf.mat', 'gm');