Code covered by the BSD License  

Highlights from
Kalman filtering demo in MATLAB with automatic MATLAB-to-C code generation

Kalman filtering demo in MATLAB with automatic MATLAB-to-C code generation

by

 

05 Mar 2010 (Updated )

Kalman filtering algorithm to track an object and generating C source code for implementation

myglobalfimath(FractionalLength)
% Copyright 2009 - 2010 The MathWorks, Inc.
function myglobalfimath(FractionalLength)

% Set global fimath properties
Fm = fimath(...
'ProductMode', 'SpecifyPrecision', ...
'ProductWordLength', 32, ...
'ProductFractionLength', FractionalLength, ...
'SumMode', 'SpecifyPrecision', ...
'SumWordLength', 32, ...
'SumFractionLength', FractionalLength, ...
'RoundMode', 'Floor', ...
'OverflowMode', 'Wrap', ...
'CastBeforeSum', true);

globalfimath(Fm);

Contact us