source: projects/ckbs/trunk/test/nonlinear_ok_simple_f.m @ 95

Last change on this file since 95 was 35, checked in by bradbell, 11 years ago

Revmove reference to gpl2.txt and further shorten copyright and license statement

File size: 953 bytes
Line 
1% -------------------------------------------------------------------
2% ckbs: Constrained Kalman-Bucy Smoother Program: Copyright (C) 2006
3% Authors: Bradlely Bell:        bradbell at washington dot edu
4%          Gianluigi Pillonetto: giapi at dei dot unipd dot it
5% License: GNU General Public License Version 2
6% -------------------------------------------------------------------
7% $begin nonlinear_ok_simple_f.m$$ $newlinech %$$
8%
9% $spell
10%       ckbs
11%       fk
12%       xk
13% $$
14%
15% $section Example Constraint Function: nonlinear_ok_simple_f$$
16%
17% $head Source Code$$
18% $newlinech $$ $codep
19function [fk, Fk] = nonlinear_ok_simple_f(k, xk)
20        global nonlinear_ok_simple_N
21        global nonlinear_ok_simple_ell
22        %
23        N   = nonlinear_ok_simple_N;
24        ell = nonlinear_ok_simple_ell;
25        n   = size(xk, 1);
26        % xk(1:ell)^2 <= N - .5
27        fk = xk(1:ell).^2 - (N - .5);
28        Fk = zeros(ell, n);
29        for i = 1 : ell
30                Fk(i, i) = 2 * xk(i);
31        end
32        return
33end
34% $$ $newlinech %$$
35% $end
Note: See TracBrowser for help on using the repository browser.