Split a column data into multiple columns

I have 1000 observations in a column.
I want to convert first 5 element in 1st row
next 5 element in 2nd row and
next 5 in 3rd row and so on....
Please someone told how can I split data.

답변 (2개)

malladi siva kumari
malladi siva kumari 2019년 10월 21일

2 개 추천

a=1:1000
a=reshape(a,5,200)

댓글 수: 1

Walter Roberson
Walter Roberson 2019년 10월 21일
This puts the first 5 as the first column not the first row as required for this purpose

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

Walter Roberson
Walter Roberson 2019년 6월 4일

1 개 추천

Rows_of_5 = reshape(YourVariable, 5, []).';

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2018b

태그

질문:

2019년 6월 4일

댓글:

2019년 10월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by