# Find likelihood from state space with Kalman filter

2 views (last 30 days)
Rob on 24 Nov 2022
Commented: Rob on 29 Nov 2022
Hi everyone,
I'm struggeling to find the correct solution approach for my problem, despite screening the forum for an answer. I have a state space system with the respective A, B, C and D matrices and successfully used
state_space = ssm(A,B,C,D) ;
The respictive sizes of the matrices are:
>> size(A)
ans =
27 27
>> size(B)
ans =
27 9
>> size(C)
ans =
9 27
>> size(D)
ans =
9 9
There is also an observation matrix y which is a 155 x 9 matrix. Can anyone point me into the right direction how I can find the likelihood function of this system, using the Kalman filter. Or would I have to code this myself, as there's no command available? Many thanks for your help!
Rob

Sam Chak on 25 Nov 2022
Hi @Rob
Perhaps you are looking for the likelihood() function.
help likelihood
--- help for trackingEKF/likelihood --- LIKELIHOOD Calculate the likelihood of a measurement l = likelihood(EKF, Z) calculates the likelihood of a measurement, Z, given the object, EKF. l = likelihood(EKF, Z, measurementParams) allows you to define additional parameters that will be used by the EKF.MeasurementFcn. It should be specified as a cell array, e.g., {1, [2;3]}. If unspecified, it will be assumed to be an empty cell array. Documentation for trackingEKF/likelihood doc trackingEKF/likelihood Other uses of likelihood AlphaBetaFilter/likelihood ggiwphd/likelihood matlabshared.tracking.internal.AbstractTrackingFilter/likelihood
##### 2 CommentsShowHide 1 older comment
Rob on 29 Nov 2022
Hi @Sam Chak, your answer might go into the right direction but I am still in the process of working things out. Thanks for your help!

### Categories

Find more on State-Space Control Design in Help Center and File Exchange

R2022a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by