Você está na página 1de 2

In developing your own Wizards, it is necessary to follow the following guidelines:

Start Guide and open the fig file that is most similar to the antenna Wizard that you wish to
add. The first step is to save this fig file under a new filename. This filename is important, as it is
the same name used in the antenna selection drop down menu, and used to call various functions
(defined below). The filename cannot contain spaces.
The next step is to edit the fig file to your specifications remembering to set Tags as these are
used in referencing objects.
The interpolation and trace select panels are not to be deleted, even if they are not needed. Instead, set the Panels (or objects) Visible property to off.
The information from these panels is used even if they are not visible. For instance, the interpolation method is set to none and cant be changed.
The fig file is the graphical information for the m file of the same name. The m file contains
program and callback information, while the fig file is the graphical information. (A callback is
an event linked to an action triggered by an object).
Axes must be tagged axes1, axes2, , axesN , excluding the antenna axes.
Once you are done editing the fig file (you may still edit the fig file at a later stage), it is necessary
to edit the m file.
The following files are common to all Wizards:
File Name
AntennaWizards.m
Interactive.m
crosshair.m
curveintersect.m
MultipleTrace.m

SetAntennas.m
SetAxes.m
Fullscreen.m
Fullscreen.fig
Summary.m
Summary.fig
ViewGraphs.m
ViewGraphs.fig

Purpose
Sets the directories, and starts the AntennaWizards
Contains all necessary information to update the
GUI when the crosshairs are moved
Contains functionality for the crosshairs
Computes the intersect point(s) between two curves.
Determines if there are multiple curves, sets the trace
panel to visible if there are, and sets the trace labels
(by curves tag)
Sets the antennas in the antenna selection popup
menu
Sets the axis limits to fit the data
Opens active axes in full screen mode
Fullscreen layout
Printable Summary implementation
Printable Summary layout
Layout Editor, allows the user to hide curves they
are not explicitly interested in
Layout Editor layout

Whilst the following files are specific to the antenna and fulfil a specific purpose:

File Name
Antenna Name.m
Antenna Name.fig
Antenna NameDraw.m
Antenna NameSetup.m
Antenna NameSetParameters.m
Antenna NameSimulate.m
Antenna NameParameters.mat

Purpose
Main file
GUI information file
Draws the antenna
Draw the graphs initially and contains
other important setup information
Updates the parameter legend
Contains SuperNEC simulation export
info for the antenna
Curve data information

The above files must be created manually and perform the specified action. It is advisable to use
the other antennas as a guide when creating these files.
Edit the function OpeningFcn in Antenna Name.m. This function sets default parameters, draws
the graphs and the antenna (by calling specified functions above). This will require you to create
the Setup, SetParameters, and Draw functions. (It may be useful to create Antenna NameDefaultParameters
to set the default parameters.)
Additionally in Setup, it is important to define Tags for graphs with multiple curves. Each curve
is assigned its own Tag and this name is used to define the name in the trace select popup menu.
Note: in the case of multiple curves, all curves must contain the same number of elements (both
x and y). This is necessary since curves are stored in a matrix of Xdata and Ydata with each
column set to the x and y data for each curve. (Note: this can be changed by changing the storage
in crosshairs.m to a cell array of vectors)
The SetParameters function accepts an X, and Y matrix where (X(i), Y (i)) corresponds to the
crosshair intercepts on axes i.
The handles structure is an important variable used throughout the Wizards, and contains handles
to all tags set in the fig file. For instance, handles.antenna is the handle to the antenna axes. (A
handle is a reference to the object and allows one to manipulate the objects parameters using
set and get).
Once the above functions are defined, it is necessary to return to Antenna Name.m and check all
callbacks are correctly defined.
Callback checklist:
X Zoom and Pan links correct axes
X Units multiplies the correct lengths by wavelength
X SetUp sets the initial parameters correctly
X Parameter callbacks are correctly defined
X Prev and next callbacks are correctly defined (where appropriate)
X EditGraphs callback loads correct variables, sets variable names and saves correct variables
X In the Summary Callback, the Summary function is passed 4 variables: The parameter
names, values, and units, as well as the antenna name.
X In the AntennaSelect callback define the current Antenna
Finally return to the file SetAntennas.m, and add the name of the new antenna to the list.

Você também pode gostar