필터 지우기
필터 지우기

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 CenterFile Exchange에서 Files and Folders에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by