Transformation matrix for matrix indices to cartesian coordinates (1,1) (1,2) (1,3) (2,1) (2,2) (2

Makayla Boyd

Makayla Boyd

Answered question

2022-06-28

Transformation matrix for matrix indices to cartesian coordinates
(1,1) (1,2) (1,3)(2,1) (2,2) (2,3)(3,1) (3,2) (3,3)
This is an example 3x3 matrix. In corresponding cartesian coordinate system, the representation would be:
(-1,1) (0,1) (1,1)(-1,0) (0,0) (1,0)(-1,1) (0,-1) (1,-1)
Say, I have any square matrix with dimension-N, where N is odd. I need a generic transformation matrix such that I can get a vector as cartesian coordinates from matrix indices. Does such a function already exist? How should I go ahead in implementing this?

Answer & Explanation

nuvolor8

nuvolor8

Beginner2022-06-29Added 32 answers

The transformation of indices is the following:
( x , y ) = f ( i , j ) = ( j n + 1 2 , i + n + 1 2 )   .
Here i is the index for the rows, j the one for the columns and n the order of your square matrix.
glycleWogry

glycleWogry

Beginner2022-06-30Added 8 answers

Interchange indices i and j in initial matrix, then flip it upside down to get the same orientation like a usual coordinate system and then subtract ( 2 , 2 ) or ( n + 1 2 , n + 1 2 ) in general to shift the center.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Linear algebra

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?