kalmanFilter.prior
Set or return the prior for a Kalman filter
Syntax
Description
Provide the prior for a Kalman filter direclty as a numeric array. Overwrites any previously specified prior. Each row is a state vector element, and each column is an ensemble member. Each element along the third dimension holds a particular prior in an evolving set. If using a static prior, X should have a single element along the third dimension. Otherwise, X should have one element along the third dimension per assimilation time step. In this case, the Kalman filter will use the indicated prior for each assimilated time step.
Provide the prior using ensemble objects. To implement a static prior, the input should be a scalar ensemble object that implements a static prior.
For evolving priors, the input may either be: 1. A scalar ensemble object that implements an evolving ensemble, or 2. A vector of ensemble objects that all implement static ensembles. In the first case, the number of priors for the assimilation will match the number of ensembles in the evolving set. In the second case, the number of priors for the assimilation will match the number of elements in the vector of ensemble objects. The number of evolving priors must match the number of assimilation time steps (although see the syntax below for relaxing that requirement). If using a vector of ensemble objects, all the objects must implement ensembles with the same number of state vector elements (nRows) and ensemble members (nMembers).
Indicate which prior to use in each assimilation time step. This syntax allows the number of priors to differ from the number of time steps.
[ X, whichPrior] = obj.prior[ens, whichPrior] = obj.prior
Returns the current prior for the Kalman filter object, and indicates which prior is used in each assimilation time step.
obj = obj.prior(‘delete’)
Deletes the current prior(s) from the Kalman filter object.