Convert sparse models to dense storage
fsys = full(
sys to dense state-space representation
mechss models, the conversion to dense
representation is equivalent to
full(sparss(sys)). For other model types,
to convert small scale sparse models to dense storage to perform operations like pole/zero
extraction, model order reduction, and controller design and tuning. Converting to dense
storage is not recommended for large scale sparse models as it may saturate available memory
and cause severe performance degradation.
For this example, consider
sparseSOFull.mat that contains a sparse second-order model with 50 nodes.
Load the sparse second-order model and convert it to dense representation using
load('sparseSOFull.mat','sys'); fsys = full(sys); size(fsys)
State-space model with 1 outputs, 1 inputs, and 100 states.
sys is a
mechss model, the conversion to dense storage is equivalent to
fsys = full(sparss(sys)). The resultant model
fsys is a full storage
ss model object with 100 states since the mass matrix is full rank.
Compare the storage size of the two representations.
Name Size Bytes Class Attributes fsys 1x1 162930 ss sys 1x1 6576 mechss
Converting to dense storage is not recommended for large scale sparse models as it may saturate available memory and cause severe performance degradation.