フィルターのクリア

uiimport command--using variables

6 ビュー (過去 30 日間)
Dylan Mecca
Dylan Mecca 2018 年 2 月 9 日
回答済み: Priyank Sharma 2018 年 2 月 22 日
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.

回答 (1 件)

Priyank Sharma
Priyank Sharma 2018 年 2 月 22 日
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.

カテゴリ

Help Center および File ExchangeFiles and Folders についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by