Open the Simulink model.
sys = 'watertank';
open_system(sys)
Vary parameters A and b within 10% of their nominal values. Specify three values for A
and four values for b, creating a 3-by-4 value grid for each parameter.
[A_grid,b_grid] = ndgrid(linspace(0.9*A,1.1*A,3),...
linspace(0.9*b,1.1*b,4));
Create a parameter structure array, specifying the name and grid points for each
parameter.
params(1).Name = 'A';
params(1).Value = A_grid;
params(2).Name = 'b';
params(2).Value = b_grid;
Create a default operating point specification for the model, which specifies that both
model states are unknown and must be at steady state in the trimmed operating point.
opspec = operspec(sys)
Operating point specification for the Model watertank.
(Time-Varying Components Evaluated at time t=0)
States:
----------
1 Steady-State Operating Points