function i_p = Initial_parameters(hObject,eventdata)
fig = figure('units','pixels',...
'position',[50 500 400 100],...
'menubar','none',...
'name','Расчет АХ самолетов - Исходные данные',...
'numbertitle','off',...
'resize','off');
i_p = guihandles(fig);
i_p.text1 = uicontrol('style','text',...
'units','normalized',...
'position',[0.05 0.6833 0.255 0.2666],...
'string','Скорость полета');
i_p.Vpol = uicontrol('style','edit',...
'units','normalized',...
'position',[0.355 0.6833 0.595 0.2666],...
'string','225',...
'tag','flight velocity');
i_p.text2 = uicontrol('style','text',...
'units','normalized',...
'position',[0.05 0.3666 0.255 0.2666],...
'string','Плотность воздуха');
i_p.plotn = uicontrol('style','edit',...
'units','normalized',...
'position',[0.355 0.3666 0.595 0.2666],...
'string','1.225',...
'tag','air density');
i_p.pushbutton_1 = uicontrol('style','push',...
'units','normalized',...
'position',[0.05 0.05 0.425 0.2666],...
'HorizontalAlign','left',...
'string','Сохранить',...
'callback',@button_1_callback);
i_p.pushbutton_2 = uicontrol('style','push',...
'units','normalized',...
'position',[0.525 0.05 0.425 0.2666],...
'HorizontalAlign','left',...
'string','Назад',...
'callback','close all;Main_menu');
uicontrol(i_p.Vpol)
guidata(fig,i_p);
end
function button_1_callback(hObject,eventdata)
i_p=guidata(hObject);
i_p.Vpol=str2double(get(i_p.Vpol,'string'));
i_p.plotn=str2double(get(i_p.plotn,'string'));
display([i_p.Vpol i_p.plotn]);
guidata(hObject,i_p);
end
0 Comments
Sign in to comment.