1 function v=h_general(obj,x,t,u,varargin)
\r
2 % Calculates: h(x,t,u) + e(t)
\r
4 % Syntax: (* = optional)
\r
6 % y = h_general(model, x, t, u, e*);
\r
13 % Column vector or scalar containing x(t)
\r
15 % Scalar containing the time of the operation.
\r
17 % Column vector or scalar containing deterministic data for this particular step.
\r
18 % Redundand argument for this model.
\r
20 % Column vector or scalar containing e(t) for this particular step.
\r
22 % e(t) is drawn from model.e
\r
27 % The result of the operation, y(t)
\r
29 % Toolbox for nonlinear filtering.
\r
30 % Copyright (C) 2005 Jakob Rosén <jakob.rosen@gmail.com>
\r
32 % This program is free software; you can redistribute it and/or
\r
33 % modify it under the terms of the GNU General Public License
\r
34 % as published by the Free Software Foundation; either version 2
\r
35 % of the License, or (at your option) any later version.
\r
37 % This program is distributed in the hope that it will be useful,
\r
38 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
39 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
40 % GNU General Public License for more details.
\r
42 % You should have received a copy of the GNU General Public License
\r
43 % along with this program; if not, write to the Free Software
\r
44 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
47 v=eval(obj.h,x,t,u,[]);
\r
49 % Handle the measurement noise
\r
52 % Fetch the e parameter
\r
58 % No e was given. Draw from model.e
\r
59 e=random(obj.e, t, 1, size(v,2));
\r
60 v=v+e; % An error message here means that e has wrong dimensions
\r
62 % e(t) was supplied. Use that value
\r
63 v=v+e; % An error message here means that the supplied e has wrong dimensions
\r