undefined function "fir1" for input of type "single" while running matlab standalone app

1 visualizzazione (ultimi 30 giorni)
Hi I have a strange issue: I compiled my GUI code to a standalone application (2014a 32 bit) and while running the standalone app I get the error that is shown in the attached picture but if I run the GUI regularly from Matlab ( running the .m or .fig file) I don't have this error what is the matter?

Risposte (1)

Walter Roberson
Walter Roberson il 29 Gen 2018
In the R2014a time-frame, it was not uncommon for GUIDE to create callbacks using strings to specify the code to be executed on the callback. The problem with that is that when callbacks are specified as strings, MATLAB Compiler cannot figure out which functions are being called, so it leaves out functions.
Try adding a line in the form of a comment,
%#function fir1
MATLAB calls this a "pragma"; it is a signal to the compiler that it needs to compile in fir1 even if it did not see any direct reference to fir1 in the code.

Categorie

Scopri di più su App Building in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by