How can i plot on axes on a GUI when click on a push button on another GUI?

2 ビュー (過去 30 日間)
Le Dung
Le Dung 2019 年 1 月 10 日
コメント済み: nadia ansari 2020 年 11 月 5 日
Hello!
i have two GUIs with an axes on GUI1 and a push button on GUI2. Now, i want to plot in axes on GUI1 by cliking in the button on GUI2 with the informations in the GUI2
how can i do ?????
I tried a code below: (in function_callback of push button on GUI2)
findaxes = findobj('Tag','modelspace') % modelspace is Tag property of axes on GUI1
plot(findaxes,data from GUI2)
But, matlab return:
findaxes =
0x0 empty GraphicsPlaceholder array.
Error using plot
Vectors must be the same length.
Error in inputpoint>ok_Callback (line 131)
plot(findaxes,rand(1,20))
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in inputpoint (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)inputpoint('ok_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
Please help me!
Thank you so much

回答 (1 件)

Kevin Phung
Kevin Phung 2019 年 1 月 11 日
try doing:
target_axes = findobj(groot,'Tag','modelspace')
hope this helps!
  2 件のコメント
Le Dung
Le Dung 2019 年 1 月 12 日
thank you. but i solved my problem
nadia ansari
nadia ansari 2020 年 11 月 5 日
how u solve ur problem plz share

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by