Array and Matrix Mathematics

Array and matrix operations, polynomial fitting

You can perform several mathematical operations on arrays and matrices using System objects and blocks in the DSP System Toolbox™. These operations include simple operations such as addition, subtraction, multiplication, and division, and more complex operations such as cumulative sum, cumulative product, and normalization. You can also extract diagonals and upper and lower triangles from matrices. In addition, there are DSP System Toolbox blocks that perform polynomial fitting in a least-squares sense, evaluate polynomial expressions, and determine if the roots of a polynomial are inside the unit circle.


dsp.ArrayVectorAdderAdd array to vector along specified dimension
dsp.ArrayVectorDividerDivide array by vector along specified dimension
dsp.ArrayVectorMultiplierMultiply array by vector along specified dimension
dsp.ArrayVectorSubtractorSubtract vector from array along specified dimension
dsp.CumulativeProductCumulative product of channel, column, or row elements
dsp.CumulativeSumCumulative sum of channel, column, or row elements
dsp.HDLComplexToMagnitudeAngleMagnitude and phase angle of complex signal—optimized for HDL code generation


expand all

Array-Vector AddAdd vector to array along specified dimension
Array-Vector DivideDivide array by vector along specified dimension
Array-Vector MultiplyMultiply array by vector along specified dimension
Array-Vector SubtractSubtract vector from array along specified dimension
Complex to Magnitude-Angle HDL OptimizedCompute magnitude and phase angle of complex signal – optimized for HDL code generation using the CORDIC algorithm
Cumulative ProductCumulative product of channel, column, or row elements
Cumulative SumCumulative sum of channel, column, or row elements
dB ConversionConvert magnitude data to decibels (dB or dBm)
dB GainApply decibel gain
DifferenceCompute element-to-element difference along specified dimension of input
NormalizationPerform vector normalization along rows, columns, or specified dimension
Create Diagonal MatrixCreate square diagonal matrix from diagonal elements
Extract DiagonalExtract main diagonal of input matrix
Extract Triangular MatrixExtract lower or upper triangle from input matrices
Identity MatrixGenerate matrix with ones on main diagonal and zeros elsewhere
Matrix 1-NormCompute 1-norm of matrix
Matrix ConcatenateConcatenate input signals of same data type to create contiguous output signal
Matrix ExponentialCompute matrix exponential
Matrix MultiplyMultiply and divide scalars and nonscalars or multiply and invert matrices
Matrix ProductMultiply matrix elements along rows, columns, or entire input
Matrix SquareCompute square of input matrix
Matrix SumAdd or subtract inputs
Overwrite ValuesOverwrite submatrix or subdiagonal of input
Permute MatrixReorder matrix rows or columns
Reciprocal ConditionCompute reciprocal condition of square matrix in 1-norm
SubmatrixSelect subset of elements (submatrix) from matrix input
ToeplitzGenerate matrix with Toeplitz symmetry
Least Squares Polynomial FitCompute polynomial coefficients that best fit input data in least-squares sense
Polynomial EvaluationEvaluate polynomial expression
Polynomial Stability TestUse Schur-Cohn algorithm to determine whether all roots of input polynomial are inside unit circle


Variable-Size Signal Support DSP System Objects

List of System objects which support variable-sized signals in DSP System Toolbox.