How to extract the 20th component of each row in a 5x25 matrix?

1 次查看(过去 30 天)
How to extract the 20th component of each row in a 5x25 matrix?
  1 个评论
Tina
Tina 2021-11-15
20th component will mean 20th colunms values from all the rows .you will do array indexing by selecting all rows and 20 col
A=zeros(5,25) B=A(:,20)
: Means every element . And if you want only for first two rows you can use B=A(1:2,20)

请先登录,再进行评论。

回答(0 个)

类别

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

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by