Split a column data into multiple columns

26 visualizzazioni (ultimi 30 giorni)
Abdul Ghaffar
Abdul Ghaffar il 4 Giu 2019
Commentato: Walter Roberson il 21 Ott 2019
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.

Risposte (2)

malladi siva kumari
malladi siva kumari il 21 Ott 2019
a=1:1000
a=reshape(a,5,200)
  1 Commento
Walter Roberson
Walter Roberson il 21 Ott 2019
This puts the first 5 as the first column not the first row as required for this purpose

Accedi per commentare.


Walter Roberson
Walter Roberson il 4 Giu 2019
Rows_of_5 = reshape(YourVariable, 5, []).';

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Tag

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by