How can I pass a figure from one function to another without printing the figure?
23 次查看(过去 30 天)
显示 更早的评论
Hello, I'd like to pass a figure from a 'called' function to it's calling function. Any idea how this is done? The figure is plotted as:
figure(1)
hold on
zoom on
axis square
for i=1:ele_n
line(defx(el_disp(i,:)),defy(el_disp(i,:)),'Color','r');
line(x(el_disp(i,:)),y(el_disp(i,:)));
end
1 个评论
Stephen23
2017-11-26
Just pass the figure handle:
I recommend guidata or nested functions, both of which are simple and intuitive.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!