Matrix in a matrix..............

조회 수: 1 (최근 30일)
Tankeswar Kumar
Tankeswar Kumar 2013년 2월 21일
In matlab:
x =
1 3 6
8 3 6
1 9 0
y =
5 4 6
7 9 4
2 6 4
Z=x(y)
Z =
3 3 9
6 0 3
8 9 3
How can i find Z manually..........
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 2월 21일
please read the guide to tags and retag this question. see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 21일
x is an array with 9 elements. y is a matrix of indices each in the range 1 to 9.
y(1) is 5, so the first output of x(y) is x(y(1)) which is x(5), the fifth element of x. Array elements are numbered down columns
1 4 7
2 5 8
3 6 9

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by