No BSD License  

Highlights from
Flight Dynamics of a Cessna

image thumbnail
from Flight Dynamics of a Cessna by Prabhakar Subrahmanyam
Performance of a Cessna Excel Model 560 XL

cessnagui(fcn)
%#####################################################################################
% AE 165 - Computer Project I
% prabhakar. s
% Aircraft Flight Dynamics Cessna Citation Excel Model 560 XL
% Files involved for computer project- I
            %(1)cessnagui.m - this file - Just type cessnagui to invoke the main GUI
            %(2)cessnagui.mat - fig file
            %(3)aceqs - EOM's for main file.
            %(4)GildeEom.m - Glide angle Vs Velocity file
            %(5)range.m, ceiling.m and runceiling.m - For range and ceiling
            %(6)Glidevel.m and RunGV.m - for glide path angle
            %(7)roc.m and runroc.m - for rate of climb
                          
            %(8) Excel.htm - Help file
            %(9)dateme.m - for writing the date on the GUI
            %(10)linemenu.m - for plot properties 
            %(11)changeme.m - subroutine for linemenu.m
            %(12)gcmenu.m - returns the handle of the current menu
            %(13)spartan.bmp & excel.jpg
%######################################################################################

% Action after pushing BUTTONS : It takes some time for computations. It helps NOT to 
%                                push buttons too many times - Patience - Thank you.  
% For some buttons, I have taken maximum care to overwrite the plots on the same figure/axes.

%######################################################################################

function cessnagui(fcn)
load cessnagui % loading the GUI figure (cessnagui.mat) file
% By default start the GUI
if nargin == 0
   fcn = 'makeGUI';
end

% This is the main switch routine

switch fcn
case 'makeGUI'

rpd=pi/180;
dpr=180./pi;
mu=3.986e5;

rearth=6378.14*1000; % radius of earth
to=0;
tf=6000;

xo=[rearth 0 0 100.0 0 0 0.273];
options=odeset('AbsTol',[1e-9 1e-9 1e-9 1e-9 1e-9 1e-9 1e-9]);
tspan=[to tf];
% tol=1.d-9;
[t,x]=ode45('aceqs',tspan,xo,options);

      
% Determine the name of this function.
cessnagui = mfilename;


a = figure('Color',[0.8 0.8 0.9], ...
	'Colormap',mat0, ...
   'Name','Aircraft Flight Dynamics for Cessna Excel Model 560 XL', ...
   'NumberTitle','off', ...  
	'PointerShapeCData',mat1, ...
   'Position',[39 69 936 647], ...
   'RendererMode','manual', ...
   'Resize','off', ...
   'Tag','Fig1');


str='b'; % initialize and set default color for plots to blue
% Axes plotone 
plotone = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[1 1 1], ...
   'ColorOrder',mat2, ...
  	'Position',[0.439872 0.428037 0.207564 0.269026], ...
   'Tag','result', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
   'ZColor',[0 0 0]);
set(plotone,'tag','result');



c = text('Parent',plotone, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[0.497653 -0.129032 0], ...
	'Tag','Axes1Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',plotone, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[-0.13615 0.494624 0], ...
	'Rotation',90, ...
	'Tag','Axes1Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',plotone, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Position',[-2.00939 2.04301 0], ...
	'Tag','Axes1Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',plotone, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[0.497653 1.03763 0], ...
	'Tag','Axes1Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);


% popup for color
pc = uicontrol('Parent',a, ...
	'Units','normalized', ...
'Callback','str=POPUPSTR(gcbo);msgbox(''Use plot properties from the Menu ....'');', ...
	'Position',[0.224359 0.262751 0.0651709 0.0278207], ...
	'String',[' c ';' r ';' g ';' b ';' m ';' y ';' k '], ...
	'Style','popupmenu', ...
	'Tag','pc', ...
  'Value',4);

% display plot one in axes

subplot(plotone);
plot(t,(x(:,1)-rearth)/1000,str);
%set(gca,'color',str) % This colors the entire axes
%set(plotone,'color','red'); % This colors the entire axes
%colordef none;
xlabel('Time (secs)')
ylabel('Altitude (kms)')
title('Altitude Vs Time')
grid


% Show a grid?
radio = uicontrol('Style','checkbox',...
   'Position',[216.75 127.5 52 15], ...
   'FontName','Tempus Sans ITC', ...
	'FontSize',12, ...
   'FontWeight','bold', ...
  	'BackgroundColor',[0.8 0.8 0.9], ...
	'ForegroundColor',[1 0 0], ...
	'Interruptible','off', ...
	'String','Grid',...
	'Callback',['cessnagui setgrid']);


 
% Axes plottwo

plottwo = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[1 1 1], ...
	'ColorOrder',mat3, ...
  	'Position',[0.735812 0.4234 0.209701 0.270572], ...
	'Tag','plottwo', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
   'ZColor',[0 0 0]);
set(plottwo,'tag','plottwo');

c = text('Parent',plottwo, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495327 -0.128342 0], ...
	'Tag','Axes1Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',plottwo, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[-0.135514 0.491979 0], ...
	'Rotation',90, ...
	'Tag','Axes1Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',plottwo, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Interruptible','off', ...
	'Position',[-3.11682 2.04278 0], ...
	'Tag','Axes1Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',plottwo, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495327 1.03743 0], ...
	'Tag','Axes1Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);

% displaying plot two: Acceleration Vs Altitude
subplot(plottwo);
plot(x(:,7),(x(:,1)-rearth)/1000)
xlabel('Acceleration (Gs)')
ylabel('Altitude (Kms)')
title('Altitude Vs Acceleration');
grid


% Axes plotthree

plotthree = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[1 1 1], ...
	'ColorOrder',mat4, ...
 	'Position',[0.443462 0.0621855 0.216111 0.286028], ...
	'Tag','plotthree', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
	'ZColor',[0 0 0]);
c = text('Parent',plotthree, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495455 -0.121827 0], ...
	'Tag','Axes1Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',plotthree, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[-0.131818 0.492386 0], ...
	'Rotation',90, ...
	'Tag','Axes1Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',plotthree, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Interruptible','off', ...
	'Position',[-1.93636 3.05584 0], ...
	'Tag','Axes1Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',plotthree, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495455 1.03553 0], ...
	'Tag','Axes1Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);

b = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[1 1 1], ...
	'ColorOrder',mat5, ...
	'Position',[1.01964 1.27381 0.225907 0.290572], ...
	'Tag','Axes1', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
	'ZColor',[0 0 0]);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495238 -0.128342 0], ...
	'Tag','Axes1Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[-0.138095 0.491979 0], ...
	'Rotation',90, ...
	'Tag','Axes1Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Interruptible','off', ...
	'Position',[-4.54762 -0.957219 0], ...
	'Tag','Axes1Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495238 1.03743 0], ...
	'Tag','Axes1Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);
b = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[1 1 1], ...
	'ColorOrder',mat6, ...
	'Position',[1.01964 1.27381 0.225907 0.290572], ...
	'Tag','Axes1', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
	'ZColor',[0 0 0]);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495238 -0.128342 0], ...
	'Tag','Axes1Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[-0.138095 0.491979 0], ...
	'Rotation',90, ...
	'Tag','Axes1Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Interruptible','off', ...
	'Position',[-4.54762 -0.957219 0], ...
	'Tag','Axes1Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495238 1.03743 0], ...
	'Tag','Axes1Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);

% display plot three - Time vs velocity
subplot(plotthree);
plot(t,x(:,4))
xlabel('Time(secs)')
ylabel('Velocity(m/s)')
title('Velocity Vs Time');
grid


% Axes plotfour
plotfour = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[1 1 1], ...
	'ColorOrder',mat7, ...
	'Position',[0.734744 0.0581855 0.207564 0.286028], ...
   'Tag','plotfour', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
	'ZColor',[0 0 0]);
c = text('Parent',plotfour, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495283 -0.121212 0], ...
	'Tag','Axes1Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',plotfour, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[-0.136792 0.494949 0], ...
	'Rotation',90, ...
	'Tag','Axes1Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',plotfour, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Interruptible','off', ...
	'Position',[-3.15566 3.05051 0], ...
	'Tag','Axes1Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',plotfour, ...
	'ButtonDownFcn','ctlpanel SelectMoveResize', ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Interruptible','off', ...
	'Position',[0.495283 1.03535 0], ...
	'Tag','Axes1Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);

% display plot four Time vs Gamma

subplot(plotfour);
plot(t,x(:,5)*dpr)
xlabel('Time (secs)')
ylabel('Gamma (deg)')
title('Gamma Vs Time');
grid


% Axes spartnik
spartnik = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
	'Color',[0.8 0.8 0.9], ...
	'ColorOrder',mat8, ...
	'Position',[0.760684 0.752705 0.165598 0.222566], ...
	'Tag','spartnik', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
	'ZColor',[0 0 0]);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[0.493506 -0.167832 0], ...
	'Tag','Axes2Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[-0.188312 0.48951 0], ...
	'Rotation',90, ...
	'Tag','Axes2Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Position',[-4.62987 1.1049 0], ...
	'Tag','Axes2Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[0.493506 1.04895 0], ...
	'Tag','Axes2Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);

% displaying spartnik image
rgb=imread('spartan.bmp','bmp');
image(rgb,'parent',spartnik);
axis off;

% Axes cessna 
cessna = axes('Parent',a, ...
	'CameraUpVector',[0 1 0], ...
   'Color',[1 1 1], ...
	'ColorOrder',mat9, ...
	'Position',[0.0202991 0.409583 0.308291 0.530325], ...
	'Tag','cessna', ...
	'XColor',[0 0 0], ...
	'YColor',[0 0 0], ...
	'ZColor',[0 0 0], ...
	'ZTickLabelMode','manual');
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[0.498462 -0.0652174 0], ...
	'Tag','Axes3Text4', ...
	'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[-0.0892308 0.497283 0], ...
	'Rotation',90, ...
	'Tag','Axes3Text3', ...
	'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','right', ...
	'Position',[-0.0615385 1.03261 0], ...
	'Tag','Axes3Text2', ...
	'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
	'Color',[0 0 0], ...
	'HandleVisibility','callback', ...
	'HorizontalAlignment','center', ...
	'Position',[0.498462 1.01902 0], ...
	'Tag','Axes3Text1', ...
	'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);
b = uicontrol('Parent',a, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.9], ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',16, ...
	'FontWeight','demi', ...
	'ForegroundColor',[1 0 0], ...
	'Position',[304.5 372 213.75 48], ...
	'String','Department of Mechanical and Aerospace Engineering', ...
	'Style','text', ...
	'Tag','Dept');
b = uicontrol('Parent',a, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.9], ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',16, ...
	'FontWeight','demi', ...
	'ForegroundColor',[1 0 0], ...
	'Position',[303.75 423 221.25 22.5], ...
	'String','San Jos State University', ...
	'Style','text', ...
	'Tag','SJSU');
b = uicontrol('Parent',a, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.9], ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',16, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 0 0], ...
	'Position',[311.25 446.25 203.25 24], ...
	'String','Aircraft Flight Dynamics', ...
	'Style','text', ...
	'Tag','reentry', ...
   'Value',1);

% buttons

help = uicontrol('Parent',a, ...
	'Units','points', ...
	'BusyAction','cancel', ...
	'Callback','cessnagui help', ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',13, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 0 0], ...
	'Interruptible','off', ...
	'Position',[16.5 39.75 45 22.5], ...
	'String','Help', ...
   'Tag','Help');
close = uicontrol('Parent',a, ...
	'Units','points', ...
	'BusyAction','cancel', ...
	'Callback','cessna close', ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',13, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 0 0], ...
	'Interruptible','off', ...
	'Position',[69 39.75 49.5 21.75], ...
	'String','Quit', ...
   'Tag','quit');

fs = uicontrol('Parent',a, ...
	'Units','points', ...
	'Callback','range;runceiling', ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 0 0], ...
	'Position',[17.25 121.5 99.75 22.5], ...
	'String','Range and Ceiling', ...
   'Tag','fs');
% Button for glide angle vs velocity
gpa = uicontrol('Parent',a, ...
	'Units','points', ...
	'Callback','RunGV', ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 0 0], ...
	'Position',[17.25 96.75 99.75 21.75], ...
	'String','Glide Path Angle', ...
   'Tag','gpa');

roc = uicontrol('Parent',a, ...
	'Units','points', ...
	'Callback','runroc;', ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 0 0], ...
	'Position',[17.25 68.25 99.75 22.5], ...
	'String','Rate of Climb', ...
	'Tag','roc');


% Displaying cessna image
% displaying cessna excel 560 XL image - download from www.cessna.com
rgb=imread('excel.jpg','jpg');
axis off;
image(rgb,'parent',cessna);
axis off;



% displaying popup for plot color
tc = uicontrol('Parent',a, ...
	'Units','normalized', ...
  'BackgroundColor',[0.8 0.8 0.9], ...
 'FontName','Tempus Sans ITC', ...
 'FontSize',12, ...
   'FontWeight','bold', ...
  	'BackgroundColor',[0.8 0.8 0.9], ...
	'ForegroundColor',[1 0 0], ...
	'HorizontalAlignment','left', ...
	'Position',[0.221154 0.307573 0.0950855 0.0247295], ...
	'String',' Color', ...
	'Style','text', ...
   'Tag','StaticText1');

% displaying the zoom radiobutton
zradio = uicontrol('Parent',a, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.9], ...
	'ForegroundColor',[1 0 0], ...
	'Callback','zoom', ...
	'Position',[160.5 72 15 16.5], ...
	'Style','radiobutton', ...
	'Tag','radiozoom');
ztext = uicontrol('Parent',a, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.9], ...
	'ForegroundColor',[1 0 0], ...
	'FontName','Tempus Sans ITC', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'Position',[179.25 72.75 31.5 14.25], ...
	'String','Zoom', ...
	'Style','text', ...
	'Tag','zoomtext');



% create top level menus.
h_menu_props = uimenu(a,'label','Plot Properties');

% create menu items
h_menu_line = uimenu(h_menu_props,'label','Line');

% create some submenu items to the line object
h_menu_line_col = uimenu(h_menu_line,'label','Colors');
h_menu_line_sty = uimenu(h_menu_line,'label','Styles');
h_menu_line_thk = uimenu(h_menu_line,'label','Width');

% create some submenu items to Styles
h_menu_line_solid = uimenu(h_menu_line_sty,'label','Solid');
h_menu_line_solid = uimenu(h_menu_line_sty,'label','Dashed');
h_menu_line_solid = uimenu(h_menu_line_sty,'label','Stars','separator','on');
h_menu_line_solid - uimenu(h_menu_line_sty,'label','Crosses');






% -------------------------- CALLBACKS --------------------------- %
   
    case 'close' % Close requested
       answer = questdlg('Really Quit Aircraft Flight Dynamics ?','','Yes','No','No');
      if strcmp(answer,'Yes')
         delete(gcbf);
         %close(all); % close all the plots
         %clear all; % clear all the variables from memory
      end
      
      
   case 'fs'   
      msgbox('working on it !!!');
      
 %  case 'plots'
 %    eh=findobj(gcbf,'tag','result');
 %    plot(t,(x(:,1)-rearth)/1000,str);
      
    
      
   case 'setgrid'
      %plotone=gca;
      %[plotone plottwo plotthree plotfour]=axes;
       grid;
      
   case 'eval'
      %str=get(color,'STRING');
      %str=popupstr(color);
      %fprintf('color is %s',str);
      msgbox('I am working on it....');
    %fprintf('the color is %C',STR); 
      
  case 'help'
	%web_bar = waitbar(0,'Please wait for help file start-up...');
  %browser_stat = web('excel.html');
  %web(['file:' which('excel.html')]); 
   %for i = 1:5;
	 %  pause(3)
     % waitbar(i/5)
   %end   
   hthelp('excel.htm');
	%close(web_bar)
      
% -------------------------- CALLBACKS --------------------------- %


end 
% end of main switch 

dateme  %  program that writes the DATE into the GUI
%linemenu % program that calls the plot properties menu in the GUI

Contact us at files@mathworks.com