source: projects/ckbs/trunk/test/nonlinear_ok_sin_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: 962 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_sin_f.m$$ $newlinech %$$
8%
9% $spell
10%       ckbs
11%       fk
12%       xk
13%       cos
14% $$
15%
16% $section Example Constraint Function: nonlinear_ok_sin_f$$
17%
18% $head Source Code$$
19% $newlinech $$ $codep
20function [fk, Fk] = nonlinear_ok_sin_f(k, xk)
21        global nonlinear_ok_sin_x4_min
22        x4_min = nonlinear_ok_sin_x4_min;
23        %
24        % constrained so that x(4) >= 1 - sin( x(1) ) + x4_min
25        ell      = 1;
26        n        = size(xk, 1);
27        %
28        fk       = 1 - sin( xk(2) ) + x4_min - xk(4);
29        Fk       = zeros(ell, n);
30        Fk(1, 2) = - cos( xk(2) );
31        Fk(1, 4) = -1;
32        return
33end
34% $$ $newlinech %$$
35% $end
Note: See TracBrowser for help on using the repository browser.