1 function objout=reset(obj,varargin)
\r
2 % Resets the SIR particle filter.
\r
3 % When this function is called, the filter forgets all previous information about the states.
\r
5 % Syntax: (* = optional)
\r
7 % obj* = reset(obj, t*);
\r
12 % The filter object to reset.
\r
14 % Sets the time property t to the given value.
\r
16 % If the object contains sample point data Ts, t will be set to Ts(1). If not, the
\r
17 % stored t property will not be altered by the reset.
\r
22 % The reset filter object.
\r
23 % If no output argument is specified, the input object in the caller's workspace
\r
26 % Toolbox for nonlinear filtering.
\r
27 % Copyright (C) 2005 Jakob Rosén <jakob.rosen@gmail.com>
\r
29 % This program is free software; you can redistribute it and/or
\r
30 % modify it under the terms of the GNU General Public License
\r
31 % as published by the Free Software Foundation; either version 2
\r
32 % of the License, or (at your option) any later version.
\r
34 % This program is distributed in the hope that it will be useful,
\r
35 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
36 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
37 % GNU General Public License for more details.
\r
39 % You should have received a copy of the GNU General Public License
\r
40 % along with this program; if not, write to the Free Software
\r
41 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
45 elseif length(obj.Ts)
\r
48 obj.xpred_particles=calc_x0(obj.model,obj.N);
\r
51 % No output variable was specified by the user.
\r
52 % We'll do the assignment manually in the caller's workspace.
\r
53 objname = inputname(1);
\r
54 assignin('caller',objname,obj)
\r