%% Extract Discrete-Time Sparse Second-Order State-Space Model Data
% For this example, consider sparseSOModels.mat which contains a discrete-time mechss model sys2.
% Load the model sys2 to the workspace and use mechssdata to extract the sparse matrices.

load('sparseSOModels.mat','sys2');
size(sys2)
[M,C,K,B,F,G,D,ts] = mechssdata(sys2);

% The matrices are returned as arrays of sparse doubles.
% Copyright 2020 The MathWorks, Inc.