linsys = linearize(sys,sys_io);
linsys.StateName
The linear model states are in default order. The linear model includes only the states
in the linearized blocks, and not the states of the full model.
ans =
'height'
'Current'
'dhdt'
(^3) Define a different state order.
stateorder = {'magball/Magnetic Ball Plant/height';...
'magball/Magnetic Ball Plant/dhdt';...
'magball/Magnetic Ball Plant/Current'};
4 Linearize the model again and show the linear model states.
linsys = linearize(sys,sys_io,'StateOrder',stateorder);
linsys.StateName
The linear model states are now in the specified order.
ans =
'height'
'dhdt'
'Current'
2 Linearization