1 function v=eval(obj,varargin)
\r
2 % Method for evaluating an expression contained in a xhandle object.
\r
4 % Syntax: (* = optional)
\r
6 % v = eval(model, x*, t*, u*, w*);
\r
11 % The model object that will be used.
\r
13 % A column vector or a scalar containing x(t).
\r
15 % A scalar containing the time t.
\r
17 % A column vector or scalar containing u(t).
\r
19 % A column vector or scalar containing w(t)
\r
24 % The result of the operation.
\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
43 expr=obj.expression;
\r
45 error('Can not evaluate an empty expression!');
\r
47 v=feval(expr,varargin{:});
\r