Evaluation of sfit function does not work in the standalone app created by AppDesigner. Help?

I am programming an app on AppDesigner which loads an sfit function from a mat file and uses feval to evaluate the sunction. It works perfectly well as a MATLAB dependent app, but shows an error when I try to run it as a standalone app: 'object of class sfit cannot be loaded'. I tried using a pragma function and adding it to the mcc, but it still does not work.
For reference, the specific code I am having trouble with looks like this:
load('HTC_table.mat'); % load HTC table with fit curves
% curve_13 fit is for global mean HTC value
HTC = feval(HTC_table.fit.model,[Vdot,Tfluid]); % W/(m^2 K)
HTC_table.fit.model contains the sfit. Since someone else has created the mat file, I am not able to see the fit formula either.I would be grateful for any help.Thanks!

 Accepted Answer

If anyone has the same problem, I found the solution: add the MATLAB sfit files from your program folder to the required files for your app

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!