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

1 Ansicht (letzte 30 Tage)
scientist121
scientist121 am 15 Nov. 2021
Kommentiert: Tina am 15 Nov. 2021
How to extract the 20th component of each row in a 5x25 matrix?
  1 Kommentar
Tina
Tina am 15 Nov. 2021
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)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by