Why do I receive an error when executing a standalone application compiled using the MATLAB Compiler which loads specialized objects like the Financial Time Series or Filter objects?

3 views (last 30 days)
I stored a Filter Object and a Financial Time Series object in a MAT file, data_ojb.mat, and created the following function
function my_fcn
load data_obj.mat;
Executing my_fcn inside MATLAB works as expected. However, if I compile the function and run the standalone executable using the following commands:
mcc -m my_fcn.m
!my_fcn
I receive the following warning message:
Warning: Class ':all:' is an unknown object class. Object 'f' of this
class has been converted to a structure.
> In my_fun at 2
Warning: Variable 'Hd' originally saved as a dfilt.dffir cannot be instantiated
as an object and will be read in as a cell.
> In my_fun at 2

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 Jan 2010
In order to load specialized MATLAB objects such as a filter object, specific MATLAB files are required from the corresponding toolbox directories. During compilation, the MATLAB Compiler does not check for the presence of specialized objects like the Financial Time Series object and the Discrete Filter Object in MAT-files, and therefore does not include the MATLAB files required to load these objects in the deployed application.
To allow the MATLAB Compiler to load objects of the Financial Time Series or Discrete Filter Objects type, include the following directives in your function:
%#function fints
%#function dfilt
For example:
function my_fcn
%#function fints
%#function dfilt
load data_obj.mat;

More Answers (0)

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!