mdl = 'magball';
open_system(mdl)
Find a steady-state operating point at which the ball height is 0.05. Create a default
operating point specification, and set the height state to a known value.
opspec = operspec(mdl);
opspec.States(5).Known = 1;
opspec.States(5).x = 0.05;
options = findopOptions('DisplayReport','off');
op = findop(mdl,opspec,options);
Specify the block path for the block you want to linearize.
blockpath = 'magball/Magnetic Ball Plant';
Linearize the specified block at the specified operating point.
linsys = linearize(mdl,blockpath,op);
Specify State Order in Linearized Model
Open the Simulink model.
mdl = 'magball';
open_system(mdl)
linearize