Generation of disturbances is now reproducible

This commit is contained in:
2020-02-05 13:36:41 +01:00
parent 62f971c2aa
commit ed4ac36c01
5 changed files with 52 additions and 4 deletions

View File

@@ -1401,6 +1401,7 @@ We define some parameters that will be used in the algorithm.
#+begin_src matlab
if args.Dwx && args.enable
rng(111);
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)))];;
@@ -1412,6 +1413,7 @@ We define some parameters that will be used in the algorithm.
#+begin_src matlab
if args.Dwy && args.enable
rng(112);
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)))];;
@@ -1423,6 +1425,7 @@ We define some parameters that will be used in the algorithm.
#+begin_src matlab
if args.Dwy && args.enable
rng(113);
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)))];;
@@ -1443,6 +1446,7 @@ We define some parameters that will be used in the algorithm.
for i = 1:N/2
C(i) = sqrt(phi(i)*df);
end
rng(121);
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)))];;
@@ -1464,6 +1468,7 @@ We define some parameters that will be used in the algorithm.
for i = 1:N/2
C(i) = sqrt(phi(i)*df);
end
rng(122);
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)))];;
@@ -1485,6 +1490,7 @@ We define some parameters that will be used in the algorithm.
for i = 1:N/2
C(i) = sqrt(phi(i)*df);
end
rng(131);
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)))];;