Borrar filtros
Borrar filtros

uiimport command--using variables

6 visualizaciones (últimos 30 días)
Dylan Mecca
Dylan Mecca el 9 de Feb. de 2018
Respondida: Priyank Sharma el 22 de Feb. de 2018
Does anybody know how to be able to pause code or have a sort of 'preemptive' way to call out variables when using uiimport to import data? More specifically, the code is running before the user can select the data wanted to use in the script. Once the code has finished, the user is able to see the variables when called out in the command window. I need the code to allow me to finish the import before running.

Respuestas (1)

Priyank Sharma
Priyank Sharma el 22 de Feb. de 2018
You can always stall the execution of the code followed by the uiimport command by storing the output as fields in a structure as follows:
S = uiimport(__);
On a note, there is an additional bug in uiimport that affects the return value method. However, this bug has been fixed for Release 14 (R14).
For previous releases, you can look for the following workaround:
1) Delete $MATLAB/toolbox/matlab/uitools/uiimport.p, where $MATLAB is your MATLAB root directory.
2) Edit the $MATLAB/toolbox/matlab/uitools/uiimport.m file.
3) Change line 493 of the uiimport.m file from
out.(vname) = ad.datastruct(names{i});
to
out.(vname) = ad.datastruct.(names{i});
by adding a period between "datastruct" and "(names{i})";
4) Exit and restart MATLAB.
Hope this helps.

Categorías

Más información sobre Files and Folders 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!

Translated by