iemmatrix
A collection of Pure Data objects for manipulating simple matrices. Its functionality includes matrix arithmetic and optional higher-mathematics, FFT, and sound-file operations when supporting libraries are available.
- Repository Source code
- Issues Report or browse issues
Contributors
People who contribute to this project.
Objects
- mtx_.cabs2
mtx_.cabs2computes the element-wise absolute value of a complex-valued matrix and outputs a real-valued matrix. - mtx_.cdiv
mtx_.cdivperforms element-wise division of two complex-valued matrices. - mtx_.cmul
mtx_.cmulperforms element-wise multiplication of two complex-valued matrices. - mtx_abs
mtx_abscomputes the absolute value of each element in an input matrix and outputs the resulting matrix. - mtx_add
mtx_addperforms matrix addition, either adding two matrices or adding a scalar offset to a matrix. - mtx_and
mtx_andperforms logical AND operations on matrices. - mtx_atan
mtx_atancomputes the arc tangent of each element in an input matrix and outputs the resulting matrix. - mtx_atan2
mtx_atan2computes the arctangent (atan2) element-wise for matrix data and outputs a matrix. - mtx_bessel
mtx_besselcalculates Bessel functions for the elements of an input matrix and outputs matrix results. - mtx_binops
mtx_binopsrepresents iemmatrix’s binary matrix arithmetic objects for addition, subtraction, matrix or element-wise multiplication, element-wise division, and element-wise power. - mtx_bitand
mtx_bitandperforms matrix logic using bitwise AND, either between two matrices or between a matrix and a scalar. - mtx_bitleft
mtx_bitleftperforms a bitwise left shift on a matrix. - mtx_bitor
mtx_bitorperforms matrix logic using bitwise OR, either between two matrices or between a matrix and a scalar. - mtx_bitright
mtx_bitrightperforms a bitwise right shift on matrix elements. - mtx_cabs2
mtx_cabs2computes the absolute value of a complex-valued matrix and outputs a real-valued matrix. - mtx_cart2sph
mtx_cart2sphconverts a matrix of Cartesian vectors into spherical coordinates. - mtx_cholesky
mtx_choleskydecomposes an input matrix using Cholesky's algorithm and outputs the result as a matrix. - mtx_cinverse
mtx_cinversecomputes the inverse of a complex-valued matrix. - mtx_circular_harmonics
mtx_circular_harmonicsevaluates circular harmonics at points specified by phi coordinates, producing a matrix suitable for uses such as 2D Ambisonic encoding. - mtx_cmul
mtx_cmulperforms multiplication of two complex-valued matrices, with each matrix supplied as separate real and imaginary parts. - mtx_col
mtx_colsets columns of a matrix, either a selected column or all columns. - mtx_colon
mtx_colonis a matrix colon operator that creates ascending row-vector sequences from start, stop, and increment values, similar to Octave. - mtx_concat
mtx_concatconcatenates two input matrices into a new matrix, either column-wise by default or row-wise. - mtx_conv
mtx_convperforms two-dimensional convolution of an input matrix with a filter-matrix kernel, providing 2D FIR filtering and outputting the resulting matrix. - mtx_convolver~
mtx_convolver~performs multi-input, multi-output signal convolution using a uniformly partitioned convolution matrix with output cross-fading. - mtx_cos
mtx_coscomputes the cosine of each element in an input matrix and outputs the resulting matrix. - mtx_cumprod
mtx_cumprodcomputes the cumulative product of a matrix in either the row or column direction, which can be used to calculate factorials or geometric series. - mtx_cumsum
mtx_cumsumcomputes the cumulative sum of a matrix in the row or column direction, making it useful for numerical integration or generating ascending number sequences. - mtx_dbtopow
mtx_dbtopowconverts each element of an input matrix from Pd-style dB values to power values. - mtx_dbtorms
mtx_dbtormsconverts each element of an input matrix from Pd-style dB values to linear RMS values. - mtx_diag
mtx_diagcreates a diagonal matrix and can also extract the diagonal of an input matrix. - mtx_diegg
mtx_dieggcreates a turned diagonal (anti-diagonal) matrix and can obtain the turned diagonal of an input matrix. - mtx_diff
mtx_diffcalculates forward or backward differences between matrix elements, making it useful for numerical derivatives of vectors and matrices. - mtx_distance
mtx_distancecalculates the Euclidean distance matrix between two sets of vectors supplied as matrices, with each row defining a vector of the same dimension. - mtx_distance2
mtx_distance2calculates a matrix of squared Euclidean distances between two sets of vectors, with each input matrix’s rows representing vectors of the same dimension. - mtx_egg
mtx_eggcreates an exchange matrix, described as a turned identity matrix. - mtx_eig
mtx_eigcomputes the complex-valued eigenvalues of an input matrix and, when requested, its eigenvectors. - mtx_element
mtx_elementsets elements of a matrix and outputs the resulting matrix. - mtx_eq
mtx_eqcompares a matrix for equality with another matrix or with a scalar, outputting a matrix. - mtx_exp
mtx_expcomputes the exponential of each element in an input matrix and outputs the resulting matrix. - mtx_eye
mtx_eyecreates an identity matrix for control-rate matrix processing. - mtx_fft
mtx_fftcomputes the forward complex-valued FFT of each row of an input matrix, producing real and imaginary output matrices with the same dimensions. - mtx_fill
mtx_fillfills elements from one matrix into specified positions of another matrix. - mtx_fill_col_grid
mtx_fill_col_gridfills supplied matrix or vector values into specified column indices of a given matrix, producing a matrix containing the inserted values. - mtx_fill_row_grid
mtx_fill_row_gridfills values into specified row indices of a given matrix and outputs the matrix containing the inserted values. - mtx_fill_rowcol
mtx_fill_rowcolfills values into a matrix at specified row and column indices, outputting the resulting matrix. - mtx_fill_rowcol_grid
mtx_fill_rowcol_gridfills a given matrix with supplied values at the grid positions defined by row and column indices, and outputs the resulting matrix. - mtx_find
mtx_findfinds the indices of nonzero elements in an input matrix and outputs them as a matrix, or an empty matrix when none exist. - mtx_find_rowcol
mtx_find_rowcolcalculates the row and column indices of nonzero elements in an input matrix or vector. - mtx_gauss
mtx_gaussapplies Gaussian elimination, using row and column transformations to shape an input matrix into an upper-triangular matrix. - mtx_ge
mtx_gecompares a matrix with another matrix for greater-than logic and outputs a matrix. - mtx_gt
mtx_gtperforms an element-wise greater-than comparison between two matrices or between a matrix and a scalar, producing a matrix result. - mtx_ifft
mtx_ifftcomputes the complex-valued inverse FFT of each row of an input matrix, producing a matrix with the same dimensions. - mtx_index
mtx_indexaddresses matrix elements by their indices, allowing multiple known elements to be selected simultaneously; its output matrix has the same shape as the indexing matrix. - mtx_index2rowcol
mtx_index2rowcolconverts a matrix or vector of linear matrix indices into separate matrices of row and column indices, compatible with indices used by objects such asmtx_find,mtx_index, andmtx_fill. - mtx_index_col_grid
mtx_index_col_gridfinds values at specified column-grid indices in a given matrix and outputs a matrix containing the indexed columns. - mtx_index_row_grid
mtx_index_row_gridfinds values at specified row-grid indices in a given matrix and outputs a matrix containing the indexed rows. - mtx_index_rowcol
mtx_index_rowcolretrieves values from a matrix at given row/column indices and outputs a matrix containing those indexed values. - mtx_index_rowcol_grid
mtx_index_rowcol_gridretrieves values at a grid of row and column indices from a given matrix. - mtx_int
mtx_intcomputes the integer value of each element in an input matrix and outputs the resulting matrix. - mtx_inverse
mtx_inversecalculates the inverse of a square matrix, for which multiplying the input and inverse in either order yields the identity matrix. - mtx_isequal
mtx_isequalcompares a matrix with another matrix or a scalar and outputs a float indicating whether all elements are equal. - mtx_ispeak
mtx_ispeaksearches each row of an input matrix or vector for peaks, outputting a logical matrix or vector with peak locations set to 1 and all other locations set to 0. - mtx_ispeakb
mtx_ispeakbsearches each row of an input matrix or vector for peaks and outputs a matrix or vector with 1 at peak locations and 0 elsewhere. - mtx_le
mtx_leperforms an element-wise less-than-or-equal comparison, either between two matrices or between a matrix and a scalar, and outputs a matrix. - mtx_linspace
mtx_linspacecreates a linearly spaced matrix vector from a start value to a stop value with a specified number of entries. - mtx_linsweep
mtx_linsweepcreates an n-sample linear sweep matrix spanning specified start and stop digital frequencies. - mtx_log
mtx_logcomputes the natural logarithm of each element in an input matrix and outputs the resulting matrix. - mtx_logspace
mtx_logspacecreates a logarithmically spaced matrix vector from a start value to a stop value with a specified number of entries. - mtx_logsweep
mtx_logsweepcreates a matrix vector containing an n-sample logarithmic sweep between specified starting and stopping digital frequencies. - mtx_lt
mtx_ltperforms element-wise less-than comparisons, comparing one matrix with another matrix or with a scalar and outputting a matrix. - mtx_matcher
mtx_matchertries to match two sets of vectors, with each set represented as a matrix. - mtx_max2
mtx_max2computes the element-wise maximum of two matrices, serving as the matrix equivalent ofmax. - mtx_mean
mtx_meancalculates the mean value of each column in an input matrix for matrix statistics. - mtx_meshgrid
mtx_meshgridcreates X and Y grid matrices from x- and y-tick vectors, producing all (x, y) value pairs. - mtx_min2
mtx_min2computes the element-wise minimum of two matrices, for matrix comparison at control rate. - mtx_minmax
mtx_minmaxfinds the minimum and maximum values of an input matrix. - mtx_mul
mtx_mulperforms matrix multiplication and outputs the resulting matrix. - mtx_mul~
mtx_mul~multiplies a set of input signals by a gain matrix to produce a set of output signals, enabling matrix-based signal routing and mixing. - mtx_neq
mtx_neqcompares a matrix with another matrix or with a scalar for inequality and outputs a matrix. - mtx_not
mtx_notperforms element-wise logical inversion of an input matrix and outputs the resulting matrix. - mtx_ones
mtx_onescreates a matrix in which every element is 1. - mtx_or
mtx_orperforms logical OR operations on matrices. - mtx_pack~
mtx_pack~packs signal vectors from multiple inputs—usually 64 samples each—into a matrix containing all channels from all input signals. - mtx_phon_curve
mtx_phon_curvecalculates a phon curve at frequencies supplied as a row or column matrix, outputting the corresponding curve values in dB. - mtx_pinverse
mtx_pinversecalculates the inverse of a square matrix using pivoting. - mtx_pivot
mtx_pivotpivot-transforms a matrix by rearranging its rows and columns so that maximum values lie on the diagonal, with the matrix maximum at the upper-left corner. - mtx_plot
mtx_plotdisplays a matrix as a plot, clipping values to the range 0 (black) to 1 (white), with optional table-based colormaps. - mtx_polyval
mtx_polyvalevaluates a polynomial with given coefficients at specified values of x. - mtx_pow
mtx_powcalculates the power function for each element of a matrix, performing element-wise matrix arithmetic. - mtx_powtodb
mtx_powtodbconverts each power value in an input matrix to Pd-style decibels and outputs a matrix. - mtx_print
mtx_printprints an incoming matrix to the console in a formatted way. - mtx_prod
mtx_prodcomputes the column-wise product of a matrix and outputs the products as a list. - mtx_qr
mtx_qrcalculates the QR decomposition of an input matrix using GSL, producing matrices Q and R such that A = Q * R. - mtx_rand
mtx_randfills a matrix with random values in the range (0, 1]. - mtx_randperm
mtx_randpermgenerates a random permutation matrix for control-rate matrix processing. - mtx_repmat
mtx_repmatrepeats an incoming matrix vertically and horizontally to form a larger meta-matrix. - mtx_resize
mtx_resizeresizes an incoming matrix to a specified number of rows and columns, then outputs the resized matrix. - mtx_reverse
mtx_reversereverses the order of a matrix’s columns, rows, or individual elements. - mtx_rfft
mtx_rfftcomputes a real-valued FFT independently for each row of an input matrix, producing real and imaginary result matrices with N/2+1 columns. - mtx_rifft
mtx_rifftcomputes a real-valued inverse FFT independently for each matrix row. - mtx_rmstodb
mtx_rmstodbconverts each element of a matrix from a linear RMS value to Pd-style decibels. - mtx_roll
mtx_rollshifts the columns of an input matrix and outputs the resulting matrix. - mtx_roots
mtx_rootssolves polynomials using eigenvalues viamtx_eig, accepting a matrix of polynomial coefficients such as1 -2 4 -12 -45 54. - mtx_rot
mtx_rotproduces a two-dimensional Cartesian rotation matrix for use in matrix-based control processing. - mtx_rotx
mtx_rotxcreates a three-dimensional Cartesian rotation matrix for rotation around the x-axis. - mtx_roty
mtx_rotyproduces a three-dimensional Cartesian rotation matrix for rotation around the y-axis. - mtx_rotz
mtx_rotzcreates a 3D Cartesian rotation matrix for rotation around the z-axis. - mtx_row
mtx_rowsets rows of a matrix and outputs the resulting matrix. - mtx_scroll
mtx_scrollshifts the rows of an input matrix and outputs the resulting matrix. - mtx_sfread
mtx_sfreadreads rows from a multichannel sound file and outputs them as a matrix. - mtx_sfwrite
mtx_sfwritewrites the rows of an input matrix to a multichannel sound file. - mtx_show
mtx_showdisplays an input matrix, with its display size adjusting automatically to the matrix dimensions and required digits. - mtx_sin
mtx_sincalculates the sine of each element in an input matrix and outputs the resulting matrix. - mtx_size
mtx_sizereports the size of an input matrix. - mtx_slice
mtx_sliceextracts a specified section from an input matrix and can be used to partition matrices. - mtx_sndfileread
mtx_sndfilereadreads multichannel data from a sound file into a matrix. - mtx_sph2cart
mtx_sph2cartconverts spherical coordinates to Cartesian coordinates in matrix form. - mtx_spherical_harmonics
mtx_spherical_harmonicsevaluates spherical harmonics at points supplied as azimuth and zenith coordinates in a 2×L input matrix, producing an output matrix whose columns are ordered by k=n²+n+m+1. - mtx_spherical_harmonics_rotator
mtx_spherical_harmonics_rotatorcomputes a Wigner-D rotation matrix for rotating spherical harmonics. - mtx_spherical_radial
mtx_spherical_radialcalculates spherical radials from a matrix of coordinates and outputs the result as a matrix. - mtx_spivot
mtx_spivotpermutes a matrix’s rows so that maximum or minimum values lie on the diagonal, although the diagonal remains unsorted. - mtx_sqrt
mtx_sqrtcalculates the square root of each element in an input matrix and outputs the resulting matrix. - mtx_sub
mtx_subperforms matrix arithmetic subtraction, either subtracting one matrix from another or subtracting an offset from a matrix. - mtx_sum
mtx_sumcomputes the column-wise sum of an input matrix and outputs the sums as a list. - mtx_svd
mtx_svdcomputes the singular value decomposition of an input matrix using GSL, expressing it as A = U * S * V^T. - mtx_symasym
mtx_symasymdecomposes a square matrix M into symmetric and asymmetric parts such that M = S + A. - mtx_tab
mtx_tabis a matrix object that uses a Pd table for local or global storage of its data. - mtx_tan
mtx_tancomputes the tangent of each element in an input matrix and outputs the resulting matrix. - mtx_trace
mtx_tracecalculates the trace of an input matrix, defined as the sum of its diagonal elements. - mtx_transpose
mtx_transposetransposes a matrix, exchanging its rows and columns. - mtx_unpack~
mtx_unpack~unpacks an incoming matrix into signal vectors, with one signal outlet per channel. - mtx_window
mtx_windowcreates a matrix row vector containing a window function, specified by a window type and length. - mtx_zeros
mtx_zeroscreates a matrix whose elements are all zero.