can't understand this statement

1 次查看(过去 30 天)
is this possible
b(1:2,3)

回答(1 个)

Davide Masiello
Davide Masiello 2022-4-4
Yes, it extracts the terms on column 3 and rows 1 and 2 of b.
Example
b = magic(5)
b = 5×5
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
b(1:2,3)
ans = 2×1
1 7

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by