clear all
fig = uifigure;
fig.Position(3:4) = [600 320];
ax = uiaxes('Parent',fig,...
'Units','pixels',...
'Position',[10 10 300 280]);
btn = uibutton(fig,...
'push',...
'Position',[400,215, 100, 22],...
'Text','Plot',...
'BackgroundColor',[0.3010 0.7450 0.20],...
'ButtonPushedFcn', @(btn,event)...
plotButtonPushed(btn,ax,...
variable_1));
import = uibutton(fig,...
'push',...
'Position',[100,290, 100, 22],...
'Text','Import',...
'BackgroundColor',[0 0.8 0.6],...
'ButtonPushedFcn', @(btn,event) plotButtonImport(fig));
function plotButtonImport(fig)
assignin('base','variable_1',10)
end
function plotButtonPushed(btn,ax,value)
k=k+1;
end
0 Comments
Sign in to comment.