Top "Matrix" questions

In mathematics, a matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns.

Remove NA/NaN/Inf in a matrix

I want to try two things : How do I remove rows that contain NA/NaN/Inf How do I set …

r matrix rows na
Inverting a 4x4 matrix

I am looking for a sample code implementation on how to invert a 4x4 matrix. I know there is Gaussian …

c++ algorithm math matrix matrix-inverse
Display matrix with row and column labels

Is there a convenient way to display a matrix with row and column labels in the Matlab terminal? Something like …

matlab matrix tabular matlab-table
How to properly mask a numpy 2D array?

Say I have a two dimensional array of coordinates that looks something like x = array([[1,2],[2,3],[3,4]]) Previously in my work so …

python numpy matrix mask masked-array
Multiply rows of matrix by vector?

I have a numeric matrix with 25 columns and 23 rows, and a vector of length 25. How can I multiply each row …

r vector matrix multiplication
Find the maximum and minimum value of every column and then find the maximum and minimum value of every row

I've got this matrix: a <- matrix(rnorm(1000 * 18, mean = 100, sd = sqrt(10)), 1000, 18) I would like to find the maximum and …

r matrix max minimum
How can I index a MATLAB array returned by a function without first assigning it to a local variable?

For example, if I want to read the middle value from magic(5), I can do so like this: M = magic(5); …

matlab indexing matrix return-value variable-assignment
How to divide each row of a matrix by elements of a vector in R

I would like to divide each row of a matrix by a fixed vector. For example mat<-matrix(1,ncol=2,…

r matrix vector
Java inverse matrix calculation

I'm trying to calculate the inverse matrix in Java. I'm following the adjoint method (first calculation of the adjoint matrix, …

java matrix matrix-inverse determinants
Excel: Formulas for converting data among column / row / matrix

Are there formulas to convert data in a column to a matrix or to a row? And to convert from/…

excel matrix excel-formula transpose