Skip to content

Commit 685fd88

Browse files
replaced the smmooth function
1 parent bb69dea commit 685fd88

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

optim_P3_small.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function optim_P3_small(debug_lvl, iter_req, count_failed, initial_parameters)
6262
% parameters for solver:
6363
TolCon = 1e-12;
6464
MaxIter = 10000;
65-
MaxFunEvals = 100000;
65+
MaxFunEvals = 50000;
6666

6767

6868
%% generate input Data
@@ -105,13 +105,16 @@ function optim_P3_small(debug_lvl, iter_req, count_failed, initial_parameters)
105105
rng(10000)
106106

107107
M4 = rand(T, 1) * 10 + 10 * sin(linspace(0, 150 * 2 * pi, T)');
108-
% M4 = smooth(M4, 4);
109108
M4 = M4 - mean(M4);
110109

111-
M5 = smooth(rand(T, 1) * 20, 10);
110+
a_filt = ones(10,1)/10;
111+
M5 = rand(T, 1) * 20;
112+
M5 = conv(M5, a_filt, 'same');
112113
M5 = M5 - mean(M5);
113114

114-
M6 = smooth(rand(T, 1) * 40, 10) + 2 * sin(linspace(0, 20 * 2 * pi, T)');
115+
M6 = rand(T, 1) * 40;
116+
M6 = conv(M6, a_filt, 'same');
117+
M6 = M6 + 2 * sin(linspace(0, 20 * 2 * pi, T)');
115118
M6 = M6 - mean(M6);
116119
M6(19:40) = 0;
117120
M6(80:90) = 0;

0 commit comments

Comments
 (0)