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
fefb3528
Commit
fefb3528
authored
Jan 28, 2013
by
Frédéric Karamé
Browse files
modification to make it comformable with the changes in resample.m
parent
51c53638
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/particle/traditional_resampling.m
View file @
fefb3528
function
indx
=
traditional_resampling
(
weights
,
noise
)
function
return_resample
=
traditional_resampling
(
particles
,
weights
,
noise
)
%
Resamples
particles
.
%
@info
:
...
...
@@ -96,6 +96,12 @@ else
indx
=
indx
+
1
;
end
if
particles
==
0
return_resample
=
indx
;
else
return_resample
=
particles
(
indx
,
:
)
;
end
%
@test
:
1
%
$
%
Define
the
weights
%
$
weights
=
randn
(
2000
,
1
).
^
2
;
...
...
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