how to use uiimport in standalone application
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Hans F Hansen
el 28 de Ag. de 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
el 28 de Ag. de 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.
Respuestas (1)
AMINE EL MOUATAMID
el 26 de Sept. de 2019
try to use this script maybe it will help you
https://www.mathworks.com/matlabcentral/fileexchange/72492-clipboard2workspace
0 comentarios
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!