1 function obj=xhandle(varargin)
\r
2 % Holds a function handle.
\r
4 % Syntax: (* = optional)
\r
6 % obj = xhandle(expression, gradx*, gradw*);
\r
11 % Function handle to the expression. The in arguments are x, t, u, w.
\r
13 % Function handle to the gradient with respect to x. The in arguments are x, t, u, w.
\r
15 % 'gradx' will be set to [], hence the EKF filter can not be used before
\r
16 % setting this property with the set command.
\r
18 % Function handle to the gradient with respect to w. The in arguments are x, t, u, w.
\r
20 % 'gradw' will be set to [], hence the EKF filter can not be used before
\r
21 % setting this property with the set command.
\r
26 % The resulting data object.
\r
28 % Toolbox for nonlinear filtering.
\r
29 % Copyright (C) 2005 Jakob Rosén <jakob.rosen@gmail.com>
\r
31 % This program is free software; you can redistribute it and/or
\r
32 % modify it under the terms of the GNU General Public License
\r
33 % as published by the Free Software Foundation; either version 2
\r
34 % of the License, or (at your option) any later version.
\r
36 % This program is distributed in the hope that it will be useful,
\r
37 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
38 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
39 % GNU General Public License for more details.
\r
41 % You should have received a copy of the GNU General Public License
\r
42 % along with this program; if not, write to the Free Software
\r
43 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
48 elseif isa(varargin{1},'xhandle')
\r
53 expression=varargin{1};
\r
57 % Declare the arguments
\r
61 % Fetch arguments, if they exist
\r
62 if nargin>=2; gradx=varargin{2}; end;
\r
63 if nargin>=3; gradw=varargin{3}; end;
\r
65 obj.expression=expression;
\r
66 obj.str=func2str2(expression);
\r
67 obj.exprsize=zeros(1,2);
\r
75 obj.description='Function handle expression';
\r
76 obj=class(obj,'xhandle');
\r