Skip to content

Commit 7d5f504

Browse files
committed
Multiple fixes
1 parent 252a9b1 commit 7d5f504

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/+otp/+lorenz96/+presets/PopovSandu.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
function obj = PopovSandu(varargin)
77

88
p = inputParser;
9-
addParameter(p, 'Size', 40, @isscalar);
10-
addParameter(p, 'Partitions', 4, @isscalar);
9+
10+
p.addParameter('Size', 40, @isscalar);
11+
p.addParameter('Partitions', 4, @isscalar);
12+
p.addParameter('ForcingPeriod', 1, @isscalar); % default corresponds to 5 days
1113

12-
parse(p, varargin{:});
14+
p.parse(varargin{:});
1315

1416
s = p.Results;
1517

1618
N = s.Size;
1719
q = s.Partitions;
18-
19-
fiveDays = 1;
20-
omega = 2 * pi/(fiveDays);
21-
22-
F = @(t) 8 + 4*cos(omega*(t + mod((1:N) - 1, q)/q)).';
20+
omega = s.ForcingPeriod;
21+
22+
F = @(t) 8 + 4*cos(2*pi*omega*(t + mod((1:N) - 1, q)/q)).';
2323

2424
params.forcingFunction = F;
2525

0 commit comments

Comments
 (0)