how to fill an array with data from intercalated/multiple range columns

조회 수: 1 (최근 30일)
Hi,
I have a matrix A, with dimensions 4000*50. I would like to select lines 1 to 2000 (1st dimension) and columns 1 to 40 and 42 to 50 to fill an array. Is there any operation/method that allows me to do it at once, avoiding the need of the function "cat". I know I can select lines 1 to 2000 and all columns to fill my array A1:
A1=A(1:2000,:)
However, I am unsure if this method/operation support intercalations, as per my requirements. Any help is appreciated.
I thank you in advance,
Best regards,

채택된 답변

Davide Masiello
Davide Masiello 2022년 3월 4일
편집: Davide Masiello 2022년 3월 4일
A1 = A(1:2000,[1:40,42:50]);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by