How to name each of the elements in an array?

5 visualizaciones (últimos 30 días)
Grace
Grace el 14 de Mayo de 2014
Respondida: Image Analyst el 14 de Mayo de 2014
Hi, I have id=[ 1 3 2; 2 6 4; 3 2 6; 4 5 1; 5 1 3; 6 4 5; 7 7 7];
I want to give a name to each of the elements in id, c_kj ( where k is the row and j is column),
for example if c_13=2 ( the value 2 is get from 1st row, 3rd column of id), if c_52=1 (the value 1 is get from 5th row, 2nd column).
The reason I want to name the elements because I want to change the position of the elements according to the formula, c_kj=c_k+3 j
which means, the original c_11=c41,
c_21=c_51
c_31=c_61
c_41=c_71
if i fixed at k=1:4
Is it possible for me to do this using matlab?
Thanks in advance.

Respuestas (1)

Image Analyst
Image Analyst el 14 de Mayo de 2014

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by