Functions not found in compiled GUI
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have an issue with calling functions using eval in a compiled GUI. I get the error:
Error using eval
Undefined function 'downsample' for input arguments of type 'double'.
The code runs just fine on my computer, and I have previously compiled the same code without issue. The line appears in a function that is only called by a user input and does not call up any other functions in the GUI. I made a small change to completely unrelated code and now this line doesn't work. I previously used "decimate" in place of downsample and that stopped working on a new version after compiling (again, without changes to that section of code), and I found that changing it to downsample worked.
The code is as follows:
eval([ nam '=downsample(double(' list{e} '),double(Sample_rate/rr));']); % decimate the data down to the reduced rate from the full rate
Any guidance would be greatly appreciated.
0 Commenti
Risposte (1)
Steven Lord
il 8 Set 2015
In general, I recommend against using EVAL. See the second problem on this documentation page. I STRONGLY recommend NOT creating variables with dynamic names like that; the first question in the Programming section of the FAQ offers alternatives that will work more robustly and potentially more quickly; avoiding the EVAL should also make that call to DOWNSAMPLE "visible" to the code analysis the Compiler needs to perform to determine what should be included in the application.
0 Commenti
Vedere anche
Categorie
Scopri di più su Software Development Tools in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!