button to plot waveforms

I have to define a GUI and have a button that plots waveforms

回答 (1 件)

Akira Agata
Akira Agata 2019 年 1 月 10 日

1 投票

Like this?
function guiSample()
h = figure;
uicontrol(...
'Parent', h,...
'Units', 'normalized',...
'Position', [0.1 0.8 0.4 0.1],...
'String', 'Push!',...
'Callback', @Callback_pb);
ax = axes(...
'Parent', h,...
'Units', 'normalized',...
'Position', [0.1 0.1 0.8 0.6]);
function Callback_pb(~,~)
plot(ax,magic(4))
end
end
guisample.png

カテゴリ

タグ

質問済み:

2019 年 1 月 9 日

回答済み:

2019 年 1 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by