Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
c8c7b9fa
Commit
c8c7b9fa
authored
Nov 16, 2012
by
Frédéric Karamé
Browse files
minor modifications.
parent
eb9bc512
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/particle/resample.m
View file @
c8c7b9fa
...
...
@@ -34,7 +34,7 @@ function indx = resample(weights,method1,method2)
%!
@end
deftypefn
%
@eod
:
%
Copyright
(
C
)
2011
-
2012
Dynare
Team
%
Copyright
(
C
)
2011
,
2012
Dynare
Team
%
%
This
file
is
part
of
Dynare
.
%
...
...
@@ -56,7 +56,13 @@ function indx = resample(weights,method1,method2)
switch
method1
case
'
residual
'
indx
=
residual_resampling
(
weights
);
if
strcmpi
(
method2
,
'
kitagawa
'
)
indx
=
residual_resampling
(
weights
,
rand
);
elseif
strcmpi
(
method2
,
'
stratified
'
)
indx
=
residual_resampling
(
weights
,
rand
(
size
(
weights
)));
else
error
(
'
particle
:
:
resample
:
Unknown
method
!
'
)
end
case
'
traditional
'
if
strcmpi
(
method2
,
'
kitagawa
'
)
indx
=
traditional_resampling
(
weights
,
rand
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment