Add parameter to enable/disable all disturbances
This commit is contained in:
@@ -304,6 +304,8 @@ This Matlab function is accessible [[file:src/initDisturbances.m][here]].
|
||||
*** Optional Parameters
|
||||
#+begin_src matlab
|
||||
arguments
|
||||
% Global parameter to enable or disable the disturbances
|
||||
args.enable logical {mustBeNumericOrLogical} = true
|
||||
% Ground Motion - X direction
|
||||
args.Dwx logical {mustBeNumericOrLogical} = true
|
||||
% Ground Motion - Y direction
|
||||
@@ -355,7 +357,7 @@ We define some parameters that will be used in the algorithm.
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
if args.Dwx
|
||||
if args.Dwx && args.enable
|
||||
theta = 2*pi*rand(N/2,1); % Generate random phase [rad]
|
||||
Cx = [0 ; C.*complex(cos(theta),sin(theta))];
|
||||
Cx = [Cx; flipud(conj(Cx(2:end)))];;
|
||||
@@ -366,7 +368,7 @@ We define some parameters that will be used in the algorithm.
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
if args.Dwy
|
||||
if args.Dwy && args.enable
|
||||
theta = 2*pi*rand(N/2,1); % Generate random phase [rad]
|
||||
Cx = [0 ; C.*complex(cos(theta),sin(theta))];
|
||||
Cx = [Cx; flipud(conj(Cx(2:end)))];;
|
||||
@@ -377,7 +379,7 @@ We define some parameters that will be used in the algorithm.
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
if args.Dwy
|
||||
if args.Dwy && args.enable
|
||||
theta = 2*pi*rand(N/2,1); % Generate random phase [rad]
|
||||
Cx = [0 ; C.*complex(cos(theta),sin(theta))];
|
||||
Cx = [Cx; flipud(conj(Cx(2:end)))];;
|
||||
@@ -389,7 +391,7 @@ We define some parameters that will be used in the algorithm.
|
||||
|
||||
*** Translation Stage - X direction
|
||||
#+begin_src matlab
|
||||
if args.Fty_x
|
||||
if args.Fty_x && args.enable
|
||||
phi = dist_f.psd_ty; % TODO - we take here the vertical direction which is wrong but approximate
|
||||
C = zeros(N/2,1);
|
||||
for i = 1:N/2
|
||||
@@ -407,7 +409,7 @@ We define some parameters that will be used in the algorithm.
|
||||
|
||||
*** Translation Stage - Z direction
|
||||
#+begin_src matlab
|
||||
if args.Fty_z
|
||||
if args.Fty_z && args.enable
|
||||
phi = dist_f.psd_ty;
|
||||
C = zeros(N/2,1);
|
||||
for i = 1:N/2
|
||||
@@ -425,7 +427,7 @@ We define some parameters that will be used in the algorithm.
|
||||
|
||||
*** Spindle - Z direction
|
||||
#+begin_src matlab
|
||||
if args.Frz_z
|
||||
if args.Frz_z && args.enable
|
||||
phi = dist_f.psd_rz;
|
||||
C = zeros(N/2,1);
|
||||
for i = 1:N/2
|
||||
|
Reference in New Issue
Block a user