Azzera filtri
Azzera filtri

how to use uiimport in standalone application

10 visualizzazioni (ultimi 30 giorni)
asad ali
asad ali il 28 Ago 2019
Commentato: Walter Roberson il 28 Ago 2023
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 Commenti
Hans F Hansen
Hans F Hansen il 28 Ago 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
Walter Roberson il 28 Ago 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.

Accedi per commentare.

Risposte (1)

AMINE EL MOUATAMID
AMINE EL MOUATAMID il 26 Set 2019
try to use this script maybe it will help you
https://www.mathworks.com/matlabcentral/fileexchange/72492-clipboard2workspace

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by