splitting data w.r.t. sampling interval

x=1:1:20;
I need to split x array w.r.t 5 sampling interval as follows;
x_5_1=[1 2 3 4 5];
x_5_2=[6 7 8 9 10];
x_5_3=[11 12 13 14 15];
x_5_4=[16 17 18 19 20];
How can I define these sub arrays w.r.t. sampling interval with codes?

 採用された回答

KSSV
KSSV 2016 年 10 月 18 日

0 投票

x = 1:20 ;
x = reshape(x,5,[])' ;

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

質問済み:

2016 年 10 月 18 日

回答済み:

2016 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by