Questions tagged [matrix]

In mathematics, a matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. The individual items in a matrix are called its elements or entries.

I need to construct a matrix defined by two variables. The first, d is the dimensions and the second, l, is the level. The matrix has as many columns as the value of d. The elements of the rows are ...

The cofactor of a 4×4 matrix can be used to convert a "regular geometry" matrix into the matrix that transforms the normals. It's an alternative to the common inverse-transpose pattern. In this post I ...

This code is a mix of the same question one time rotating to the right and one time to the left.
I tried to simplify the code since I'm struggling with all of the indexing here.
https://leetcode.com/...

I started to work on this CUDA C matrix class to learn both the object oriented programming in C++ and to learn CUDA. The initial goal of this project was to make a matrix class that can have almost ...

Currently, I am in the process of optimizing a MIPS assembly program that takes a n x n matrix and multiplies it with its transpose. I am trying to optimize my matrix calculation algorithm so that it ...

I wish to transpose a square matrix, permanently overwriting it.
This is not the same as creating a 2nd matrix with the transposed contents of the 1st matrix.
I call the procedure with 3 parameters: ...

I am integrating a system of perturbed phase oscillators. I define the system of equation and also the Jacobian matrix. I have to reshape the one dimensional vector of system state to a 2 dimensional ...

C++ newbie trying to build a class to represent a dataset for the purposes of building predictive models of the form y ~ x0, x1,... Since this is version 1, I'm assuming some nice properties about my ...

I am trying to optimize matrix multiplication on a single processor by optimizing cache use. I am implemented a block multiplication and used some loop unrolling, but I'm at a loss on how to optimize ...

I recently wrote a matrix module in C++.
During the development process I quoted some source code and found a problem.
For example, matrix multiplication:
This way is suitable for all N×N matrices：
...

I would like to ask how I can make my code more simple and effective. I know that this code can be 100% better. I am supposed to load number for each array and then take the 2 arrays (4*3 and 3*4) and ...

I recently did problem 1.7 Rotate Matrix in Cracking the Coding Interview. I realized my code is very different than what is in the book and what I am also fining online (I'm having trouble following ...

I wanted to make a matrix template class to see if I can learn how to use templates, work on figuring out the indexing in loops, and making an interface so the user can know if an operation will work. ...