필터 지우기
필터 지우기

How do I separate columns?

조회 수: 28 (최근 30일)
Marcelo Costa
Marcelo Costa 2013년 1월 29일
I have an array with 174 columns. I have to separate them from 3 columns, and the columns column 1 is 1 4 7 10, so until the end. In column 2 is 2 5 8 11 and so on until the end and column 3 is 3 6 9 12 until the end. I wonder if it has to do this?
  댓글 수: 1
Jan
Jan 2013년 1월 29일
Is this a homework?

댓글을 달려면 로그인하십시오.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 29일
편집: Azzi Abdelmalek 2013년 1월 29일
A=rand(10,174) % Your initial array
M1=A(:,1:3:end);
M2=A(:,2:3:end);
M3=A(:,3:3:end);

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by