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

load('sparseFOData.mat','sys2');
size(sys2)
[A,B,C,D,E,ts] = sparssdata(sys2);

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