1 function pr=pyx(obj,y,x,t,u);
\r
2 % Calculates p(y|x), ie the probability of y given x.
\r
4 % Syntax: (* = optional)
\r
6 % pr = pyx(model, y, x, t, u);
\r
13 % Column vector or scalar containing y
\r
15 % Column vector or scalar containing x
\r
17 % Scalar containing the time of the operation.
\r
19 % Column vector or scalar containing deterministic data.
\r
24 % The resulting probability.
\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 yrep=repmat(y,1,size(x,2));
\r
44 ypred=eval(obj.h,x,t,u,0);
\r
45 pr=pdf(obj.e,t,yrep-ypred);
\r