How to split a column matrix into N parts
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi Everyone,
I have a column matrix with dimensions 100000 x 1 and I want to split that column into 100 columns each containing 1000 of the datapoints. Is there a way to go about doing that?
Thank you,
Tyler Seudath
댓글 수: 0
채택된 답변
Dave B
2021년 11월 5일
reshape is a great way to do this:
x=rand(100000,1);
y=reshape(x,1000,100);
y1=reshape(x,1000,[]); % Because the 100 is determined, you can let MATLAB calculate it
y2=reshape(x,[],100); % Because the 1000 is determined, you can let MATLAB calculate it
x(1:10)
x(1001:1010)
y(1:10,1:2)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!