|
|
The perl script for the automatic generation of m-file documentation in XHTML is fully described in the Perl section (Matlab documentation).
|
|
|
|
Format - (optional) String containing formatstring, uses same
syntax as sprintf
if omitted, '%g' is used
Between - (optional) String containing characters to put
between elements in VarData
if omitted, ' ' is used
VarData - Variable(s) to pretty print, may be a scalar,
a character, a string, a matrix, a cell array or
a structure with all of this, even mixed up
If only 2 input parameters are provided, the first input is
Format and the second input VarData, Between is set to an empty
string.
If only 1 input parameters is provided, the first input is
VarData, Format and Between are set to default values.
PrString - String containing the elements in VarData pretty
printed
ErrMsg - String containing possible error message, then PrString
is an empty string
ErrMsg is an empty matrix, when no error occured
>>prprintf('%g', '/', [1.02 4.07 3.0532])
1.02/4.07/3.0532
>>prprintf('%.3g ', [1.02 4.07; 3.0532 5.875; 3.324 4.123])
1.02 4.07 3.05 5.88 3.32 4.12
>>prprintf('%s', ' ', ['eins';'zwei';'drei';'vier'])
eins zwei drei vier
|
|
OBJ_F - string with function name of objective function
if omitted, 'objfun1' is assumed
Bounds - Matrix containing the boundaries of the objective
function for mesh plotting, same format as in
objective function.
Bounds=[lower_bound_x1, lower_bound_x2;
upper_bound_x1, upper_bound_x2]
if Bounds has more than 2 columns, than first one or two
columns with Bounds(2)-Bounds(1) are used for variation
plot
if Bounds are omitted, the objective function is called with
first parameter empty and second parameter 1 to get the
default boundaries
Points - Scalar/vector containing number of mesh grid points.
If 2 scalars are provided, the first is used for
points in x1 and the second for points in x2.
If 1 scalar is provided it is used for points in x1 and x2
if ommitted, 25 points in both directions are assumed
"Undocumented features of Points"
if Points contains more than one row, each row has the
following meaning:
first row: number of mesh grid points
second row: value of optimum for first and second dimension
a doted line is plotted along this value
third row: define limits for y-values of 2-D plots
(doesn't work at the moment for 3-D plots)
varargin - additional parameters for the objective function
none
% plot with default parameters
plotmesh('objfun1');
% use default boundaries, use 20 grid point in both dimensions
plotmesh('objfun1', [], 20);
% same boundaries for both dimensions, use 100 grid points per dimension
plotmesh('objfun1', [-10; 10], 100);
% define different points for every dimension
plotmesh('objfun1', [-10, -5; 10, 5], [40, 30]);
% define different points for every dimension, plot lines at x=0 and
% y=0 to indiciate optimum
plotmesh('objfun8', [-10, -5; 10, 5], [30, 30; 0, 0]);
% visualize variable 4 and 7 of multidimensional function, set the remaining
% variable 1,2,3,5,6 and 8 to zero
plotmesh('objfun10', [0,0,0,-20,0,0,-10,0;0,0,0,20,0,0,10,0], [50, 50; 0, 0]);
| previous:
|
next:
|