nfexamplefunction.m
来自「介绍了几个基于EKF扩展卡尔曼滤波的例子」· M 代码 · 共 40 行
M
40 行
function p = nfExampleFunction()% nfExampleFunction - nfExampleFunction constructor%% The nfExampleFunctiondefines folloving nonlinear multivariate function%% | x1*x2+w1 | | x1 | | w1 |% f = | | where x = | | is state and w = | | noise% | x2+w2 | | x2 | | w2 |%%% Nonlinear Filtering Toolbox version 2.0rc1% Copyright (c) 1995 - 2006 NFT developement Team,% Department of Cybernetics,% University of West Bohemia in Pilsenp.nffun = '[x1*x2+w1;x2+w2]'; % necessary for display methodp.parameters = {'x1' 'x2' 'w1' 'w2'}; % list names of all variablesp.nvar = 4; % specify number of variables%--------------------------------------------------------------------------% alternativelly it is possible to use generic naming as used e.g. by class% nfLinFuctin i.e%% p.parameters = {'state' 'noise'};% p.nvar = 2;%% This variant is advisable for high dimension functions. The choise must% be used consistently within the class methods (nfdiff,nfeval,get,...)%--------------------------------------------------------------------------p.nu = 0; % dimension of inputp.nx = 2; % dimension of statep.nxi = 2; % dimension of noisep.linear = { 0 0 1 1 }; % set index of linearity for all variables% Create object as a child of object nfFunctionNFFUNCTION = nfFunction(p.nffun,p.parameters,p.nvar,p.nu,p.nx,p.nxi,p.linear);p = class(p,'nfExampleFunction',NFFUNCTION);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?