Index-> contents reference index search external Previous Next Up-> ckbs ckbs_nonlinear nonlinear_utility persist_g.m ckbs-> license ckbs_t_general ckbs_nonlinear ckbs_L1_nonlinear ckbs_affine ckbs_affine_singular ckbs_L1_affine utility all_ok.m whatsnew wishlist bib ckbs_nonlinear-> get_started_ok.m sine_wave_ok.m vanderpol_ok.m nonlinear_utility nonlinear_utility-> box_f.m direct_h.m distance_h.m no_f.m persist_g.m pos_vel_g.m sine_f.m persist_g.m Headings-> Syntax Notation Purpose initial k xk1 gk Gk Source Code

ckbs_nonlinear: Example of Persistence Transition Function

Syntax
```[gk]     = persist_g(k, xk1, params) ``` ```[gk, Gk] = persist_g(k, xk1, params) ```
Notation
```    initial = persist_g.initial       n       = size(xk1, 1) ```
Purpose
Implements the persistence model for state transitions; i.e., the mean of the state at time index `k` given the state at time index `k-1` is its value at time index `k-1` . (This corresponds to a random walk model.)

initial
is a column vector of length `n` specifying the initial estimate for the state vector at time index one.

k
is a positive integer scalar specifies the current time index.

xk1
is a column vector specifying a value for the state vector at the previous time index `k-1` .

gk
If `k == 1` , the return value `gk` is equal to `initial` . Otherwise, `gk` is equal to `xk1` .

Gk
The return value `Gk` is an `n x n` matrix equal to the Jacobian of `gk` w.r.t `xk1` ; i.e., the identity matrix.

Source Code ``` function [gk, Gk] = persist_g(k, xk1, params) initial = params.persist_g_initial; n = size(xk1, 1); if k == 1 gk = initial; Gk = zeros(n, n); else gk = xk1; Gk = eye(n); end return end ```
Input File: example/nonlinear/persist_g.m