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

조회 수: 1 (최근 30일)
scientist121
scientist121 2021년 11월 15일
댓글: Tina 2021년 11월 15일
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