106 lines
3.4 KiB
Mathematica
106 lines
3.4 KiB
Mathematica
|
%%
|
||
|
clear;
|
||
|
close all;
|
||
|
clc
|
||
|
|
||
|
%% Coherence
|
||
|
load('../raw_data/coher_marble_x.mat') % coh1
|
||
|
coh_marble_x = zeros(size(coh1, 1), 10);
|
||
|
coh_marble_x(:, 2) = coh1(:, 2); % marble_x
|
||
|
coh_marble_x(:, 5) = coh1(:, 3); % tilt_x
|
||
|
coh_marble_x(:, 8) = coh1(:, 4); % hexa_x
|
||
|
|
||
|
load('../raw_data/coher_hexa_x.mat') % coh2
|
||
|
coh_hexa_x = zeros(size(coh2, 1), 10);
|
||
|
coh_hexa_x(:, 2) = coh2(:, 2); % marble_x
|
||
|
coh_hexa_x(:, 5) = coh2(:, 3); % tilt_x
|
||
|
coh_hexa_x(:, 8) = coh2(:, 4); % hexa_x
|
||
|
|
||
|
load('../raw_data/coher_marble_y.mat') % coh3
|
||
|
coh_marble_y = zeros(size(coh3, 1), 10);
|
||
|
coh_marble_y(:, 3) = coh3(:, 2); % marble_y
|
||
|
coh_marble_y(:, 6) = coh3(:, 3); % tilt_y
|
||
|
coh_marble_y(:, 9) = coh3(:, 4); % hexa_y
|
||
|
|
||
|
load('../raw_data/coher_hexa_y.mat') % coh4
|
||
|
coh_hexa_y = zeros(size(coh4, 1), 10);
|
||
|
coh_hexa_y(:, 3) = coh4(:, 2); % marble_y
|
||
|
coh_hexa_y(:, 6) = coh4(:, 3); % tilt_y
|
||
|
coh_hexa_y(:, 9) = coh4(:, 4); % hexa_y
|
||
|
|
||
|
load('../raw_data/coher_marble_z.mat') % coh5
|
||
|
coh_marble_z = zeros(size(coh5, 1), 10);
|
||
|
coh_marble_z(:, 4) = coh5(:, 2); % marble_z
|
||
|
coh_marble_z(:, 7) = coh5(:, 3); % tilt_z
|
||
|
coh_marble_z(:, 10) = coh5(:, 4); % hexa_z
|
||
|
|
||
|
load('../raw_data/coher_hexa_z.mat') % coh6
|
||
|
coh_hexa_z = zeros(size(coh6, 1), 10);
|
||
|
coh_hexa_z(:, 4) = coh6(:, 2); % marble_z
|
||
|
coh_hexa_z(:, 7) = coh6(:, 3); % tilt_z
|
||
|
coh_hexa_z(:, 10) = coh6(:, 4); % hexa_z
|
||
|
|
||
|
%% Save Coherence data
|
||
|
save('../data/id31_microstation_2018_01_12_coh.mat', ...
|
||
|
'coh_marble_x', ...
|
||
|
'coh_hexa_x', ...
|
||
|
'coh_marble_y', ...
|
||
|
'coh_hexa_y', ...
|
||
|
'coh_marble_z', ...
|
||
|
'coh_hexa_z');
|
||
|
|
||
|
%% Frequency Response
|
||
|
load('../raw_data/freq_frf.mat') % freq_fr
|
||
|
|
||
|
% force_factor = 1/100;
|
||
|
% speed_factor = 1/1.2;
|
||
|
% scale_factor = speed_factor/force_factor;
|
||
|
|
||
|
scale_factor = 1;
|
||
|
|
||
|
load('../raw_data/frf_marble_x.mat') % ReIm1
|
||
|
frf_marble_x = zeros(size(ReIm1, 1), 10);
|
||
|
frf_marble_x(:, 2) = -scale_factor*ReIm1(:, 2); % marble_x
|
||
|
frf_marble_x(:, 5) = -scale_factor*ReIm1(:, 3); % tilt_x
|
||
|
frf_marble_x(:, 8) = -scale_factor*ReIm1(:, 4); % hexa_x
|
||
|
|
||
|
load('../raw_data/frf_hexa_x.mat') % ReIm2
|
||
|
frf_hexa_x = zeros(size(ReIm2, 1), 10);
|
||
|
frf_hexa_x(:, 2) = -scale_factor*ReIm2(:, 2); % marble_x
|
||
|
frf_hexa_x(:, 5) = -scale_factor*ReIm2(:, 3); % tilt_x
|
||
|
frf_hexa_x(:, 8) = -scale_factor*ReIm2(:, 4); % hexa_x
|
||
|
|
||
|
load('../raw_data/frf_marble_y.mat') % ReIm3
|
||
|
frf_marble_y = zeros(size(ReIm3, 1), 10);
|
||
|
frf_marble_y(:, 3) = -scale_factor*ReIm3(:, 2); % marble_y
|
||
|
frf_marble_y(:, 6) = -scale_factor*ReIm3(:, 3); % tilt_y
|
||
|
frf_marble_y(:, 9) = -scale_factor*ReIm3(:, 4); % hexa_y
|
||
|
|
||
|
load('../raw_data/frf_hexa_y.mat') % ReIm4
|
||
|
frf_hexa_y = zeros(size(ReIm4, 1), 10);
|
||
|
frf_hexa_y(:, 3) = scale_factor*ReIm4(:, 2); % marble_y
|
||
|
frf_hexa_y(:, 6) = scale_factor*ReIm4(:, 3); % tilt_y
|
||
|
frf_hexa_y(:, 9) = scale_factor*ReIm4(:, 4); % hexa_y
|
||
|
|
||
|
load('../raw_data/frf_marble_z.mat') % ReIm5
|
||
|
frf_marble_z = zeros(size(ReIm5, 1), 10);
|
||
|
frf_marble_z(:, 4) = scale_factor*ReIm5(:, 2); % marble_z
|
||
|
frf_marble_z(:, 7) = scale_factor*ReIm5(:, 3); % tilt_z
|
||
|
frf_marble_z(:, 10) = scale_factor*ReIm5(:, 4); % hexa_z
|
||
|
|
||
|
load('../raw_data/frf_hexa_z.mat') % ReIm6
|
||
|
frf_hexa_z = zeros(size(ReIm6, 1), 10);
|
||
|
frf_hexa_z(:, 4) = scale_factor*ReIm6(:, 2); % marble_z
|
||
|
frf_hexa_z(:, 7) = scale_factor*ReIm6(:, 3); % tilt_z
|
||
|
frf_hexa_z(:, 10) = scale_factor*ReIm6(:, 4); % hexa_z
|
||
|
|
||
|
%% Save Frequency Response Data
|
||
|
save('../data/id31_microstation_2018_01_12_frf.mat', ...
|
||
|
'freq_frf', ...
|
||
|
'frf_marble_x', ...
|
||
|
'frf_hexa_x', ...
|
||
|
'frf_marble_y', ...
|
||
|
'frf_hexa_y', ...
|
||
|
'frf_marble_z', ...
|
||
|
'frf_hexa_z');
|