How to name each of the elements in an array?

12 次查看(过去 30 天)
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.

回答(1 个)

Image Analyst
Image Analyst 2014-5-14

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by