Vary Multiple Parameters at the Command Line
To vary the value of multiple parameters for batch linearization with linearize,
slLinearizer, or slTuner, specify parameter samples as a structure array. The
structure has an entry for each parameter whose value you vary. The structure for each
parameter is the same as described in “Vary Single Parameter at the Command Line” on
page 3-62. You can specify the Value field for a parameter to be an array of any
dimension. However, the size of the Value field must match for all parameters.
Corresponding array entries for all the parameters, also referred to as a parameter grid
point, must map to a desired parameter combination. When the software linearizes the
model, it computes a linearization — an ss model — for each grid point. The software
populates the SamplingGrid property of each linearized model with information about
the parameter grid point that the model corresponds to.
Specify Full Grid
Suppose that your model has two parameters whose values you want to vary, a and b:
a= a1,a 2
b= b1,b 2
You want to linearize the model for every combination of a and b, also referred to as a full
grid:
(a 1 ,b 1 ), (a 1 ,b 2 )
(a 2 ,b 1 ), (a 2 ,b 2 )
Create a rectangular parameter grid using ndgrid.
a1 = 1;
a2 = 2;
a = [a1 a2];
b1 = 3;
b2 = 4;
b = [b1 b2];
[A,B] = ndgrid(a,b)
A
A =
Specify Parameter Samples for Batch Linearization