Compile the curve fitting toolbox to create a standalone application

I am working on Matlab R2016a. I have used the fitresult and predint functions from the curve fitting toolbox in my code and now I need to create a standalone application. Although I could successfully compile the code and generate the .exe, it cannot be successfully executed. I get the fllowing error: Warning: Variable 'fitresult' originally saved as a cfit cannot be instantiated as an object and will be read in as a uint32. > In NC (line 51) Undefined function or variable 'predint'. Please could someone help me in solving this?

Answers (1)

I assume that your code call load to load a MAT-file containing a cfit object created inside MATLAB into your function, but that your code never actually calls cfit. In that case I believe you're running into the issue described in the Tip in the "Fixing Callback Problems: Missing Functions" section on this documentation page.
The solution given is: "Use the mcc -a argument or the %#function pragma to identify .mat file classes or functions that should be supported by the load command." Use one of those techniques to tell MATLAB Compiler that it needs to include cfit.m in the application.

Categories

Asked:

on 29 Nov 2017

Commented:

on 29 Nov 2017

Community Treasure Hunt

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

Start Hunting!