Split a column data into multiple columns

28 ビュー (過去 30 日間)
Abdul Ghaffar
Abdul Ghaffar 2019 年 6 月 4 日
コメント済み: Walter Roberson 2019 年 10 月 21 日
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 日
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 日
Rows_of_5 = reshape(YourVariable, 5, []).';

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by