Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Sharing Three Dimensional Array Variable Among GUIs
3 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone !
I am really new to matlab, and I am wondering if I could share a three dimensional array variable among GUIs.
I have tried using global variables. And I have typed the global variable declaration in every function/callbacks. But it doesn't work, it keeps giving an empty variable.
I prefer using a global variable. Any idea how to do the trick?
Please help me !
Thanks in advance
2 件のコメント
ChristianW
2013 年 4 月 4 日
Can you specify your GUIs. Do you have several figures with ui-objects or only 1 figure? Are your GUIs programmed or are they GUIDE GUIs?
回答 (2 件)
ChristianW
2013 年 4 月 5 日
In a GUIDE its provided to use the handles structure. But, using global does also work.
You need to declare the variable as global in every function (in which you use the variable). Global variables get a cyan color in code (at standard color-preferences). If you allready have done that, show the code line that assigns your variable.
The variable dimension is irrelevant in this regard.
3 件のコメント
ChristianW
2013 年 4 月 5 日
Try to use empty initiate instead of clearvars.
poro_data = [];
Now to your empty output. The _OutputFcn will be executed directly after the _OpeningFcn. You need to tell your GUI to wait with the uiwait(handles.figure1); command at the end of the _OpeningFcn. To resume create a button or something with uiresume(handles.figure1) as callback.
Jan
2013 年 4 月 5 日
If you want to learn somtheing about sharing data between GUIs, it would be a gooid strategy to search in the forum for "sharing data". You find a large number of related questions with solutions.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!