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.

Antworten (2)

malladi siva kumari
malladi siva kumari am 21 Okt. 2019

2 Stimmen

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

1 Kommentar

Walter Roberson
Walter Roberson am 21 Okt. 2019
This puts the first 5 as the first column not the first row as required for this purpose

Melden Sie sich an, um zu kommentieren.

Walter Roberson
Walter Roberson am 4 Jun. 2019

1 Stimme

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

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018b

Tags

Gefragt:

am 4 Jun. 2019

Kommentiert:

am 21 Okt. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by