function matlabhelp
f = figure('Visible','on',...
'MenuBar','none',...
'Units','pixels',...
'Color',[0 0 1],...
'Tag','f',...
'Position',[360,500,500,200]);
Position=get(f,'Position');
x=Position(1);
y=Position(2);
dx=Position(3);
dy=Position(4);
Intro = {'Enter a scalar'};
uicontrol('Style', 'text',...
'Units','pixels',...
'Position',[ dx/20 1.5*dy/2 5*dx/10 dy/7],...
'string', Intro,...
'BackgroundColor', [0 0 1],...
'ForegroundColor', [1 1 1]);
MWC5plusedit=uicontrol('Style', 'edit',...
'Units','pixels',...
'Position',[ 6*dx/10 1.5*dy/2 dx/5 dy/7],...
'String','',...
'Tag', 'MWC5plusedit',...
'BackgroundColor', [1 1 1],...
'ForegroundColor', [0 0 0]);
uicontrol('Style', 'pushbutton',...
'Units','pixels',...
'Position',[ 8.5*dx/10 1.5*dy/10 1.5*dx/10 dy/7],...
'String','OK',...
'Tag', 'MWC5plusOKpushbutton',...
'HorizontalAlignment', 'center',...
'Callback', @MWC5plusOKpushbutton_Callback);
handles=guidata(f);
handles=guidata(MWC5plusedit);
end
function MWC5plusOKpushbutton_Callback(~,~,handles)
scalar=get(handles.MWC5plusedit,'value')
end
2 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/39771-reference-to-non-existent-field#comment_82227
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/39771-reference-to-non-existent-field#comment_82227
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/39771-reference-to-non-existent-field#comment_82236
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/39771-reference-to-non-existent-field#comment_82236
Sign in to comment.