How to transfer variables between GUIs??

1 回表示 (過去 30 日間)
minu s
minu s 2018 年 7 月 5 日
編集済み: Stephen23 2018 年 7 月 5 日
I am facing a problem with the transfer of variables between the GUIs. I have used the matlab function 'getappdata' to store the variables and 'setappdata' to load the variable in another GUI. But I am getting an error message as " Error using setappdata Too many output arguments." I am not able to solve this issue. Kindly help me.

採用された回答

Stephen23
Stephen23 2018 年 7 月 5 日
編集済み: Stephen23 2018 年 7 月 5 日
"I have used the matlab function 'getappdata' to store the variables and 'setappdata' to load the variable in another GUI"
It looks like you have used the exactly the wrong way round: setappdata is for storing data in a graphics object, getappdata is for getting it back out again:
setappdata(obj,'name',val)
val = getappdata(obj,'name')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMaintain or Transition figure-Based Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by