To refer index of the first number in every column in 3d matrices

1 回表示 (過去 30 日間)
fyza affandi
fyza affandi 2018 年 11 月 25 日
編集済み: Stephen23 2018 年 11 月 25 日
t (:,:,1) =
1 6 11
2 7 12
3 8 13
4 9 14
5 10 15
t (:,:,2)=
16 21 26
17 22 27
18 23 28
19 24 29
20 25 30
How can I refer number 1, 6, 11 in t(:,:,1) and number 16,21,26 in t(:,:,2)?
t(end) is equal to 30.
How about 15 in t(:,:,1)?

採用された回答

Stephen23
Stephen23 2018 年 11 月 25 日
編集済み: Stephen23 2018 年 11 月 25 日
Your question is not clear because you ask for "the first number in every column", i.e.:
t(1,:,1)
t(1,:,2)
t(1,:,:) %both
But your example "How about 15" asks about the last number in the column, i.e.:
t(end,:,1)
t(end,:,2)
t(end,:,:) % both
For 15 specifically:
t(end,end,1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by