how to use uiimport in standalone application
7 views (last 30 days)
Show older comments
i am developing an application and i am using uiimport in my GUI
however, when i complie the application using matlab standalone app complier and run the standalone application, uiimport function doesnot work
kindly help and i cannot provide u with code and i am reading csv file using uiimport in my GUI and everytime i have to perform certain tests the csv length (i.e variables) will change
please dont ask for code
regards
3 Comments
Hans F Hansen
on 28 Aug 2023
I'm having the same problem
I use a function in my code to launch the Import Tool
_____
function [data,varname] = UseImportToolFun
% Open a file in MATLAB Import Tool and return the loaded variable
vars1 = whos;
uiimport('-file')
fprintf('Waiting for importedData...')
while length(who)==1
pause(1)
end
fprintf('\n')
newvars = whos;
% make a copy of the newly added variable named data
varname = newvars(1).name;
eval(sprintf('data=%s;',varname));
end
_____
It all works well when I run it in the matlab environment, but when I compile my application to a stand-alone application with the matlab compiler, it crashes on the uimport('-file') line. Is there a solution to this problem so that I can still use the interactive import tool?
Thanks,
Hans
Walter Roberson
on 28 Aug 2023
No, uiimport() allows the user to choose the output representation and allows the user to generate code. The compilation process needs to be more specific about the output representation, and compiled executables do not support code generation.
Compiled executables also do not support eval() . Or whos for that matter.
You are going to need to rewrite the code entirely.
Answers (1)
AMINE EL MOUATAMID
on 26 Sep 2019
try to use this script maybe it will help you
https://www.mathworks.com/matlabcentral/fileexchange/72492-clipboard2workspace
0 Comments
See Also
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!