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