Why does my MATLAB code not wait for UIIMPORT to complete?
4 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2012 年 7 月 23 日
編集済み: MathWorks Support Team
2020 年 12 月 1 日
I am using UIIMPORT. My code continues to execute before I have completed using the UIIMPORT wizard. However, I need to have the UIIMPORT variables available before the code continues.
採用された回答
MathWorks Support Team
2020 年 12 月 1 日
編集済み: MathWorks Support Team
2020 年 12 月 1 日
To block code execution until the user has finished using the Import Wizard, request a return value from UIIMPORT. For example:
S=uiimport;
However, note that there is an additional bug in UIIMPORT that affects the return value method. This can be resolved using the following Related Answer:
1 件のコメント
Walter Roberson
2015 年 12 月 11 日
Shawn,
The situation is like using load(): if you load() without assigning the value to anything then individual variables are created in your workspace, but if you assign load() to a variable then the result is a struct array that has one field for each variable that was loaded. In your situation you could use
drs_struct = uiimport('-file');
data = drs_struct.data;
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で String についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!