How to split array in n part every m points ?
20 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone,
This question is very frustrating. 3 months ago, I found, 'by chance', a function that I didn't need, and now I need it and I don't remenber the name...
For approximately 4 hours i searched this function, and it seems I don't have 'luck' anymore
On a matrix of 1*n, this function split this matrix into vectors of p values with a step of r .
For example :
A = [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ];
B = function(A,p,r) ; returned B = [ 1 2 3 ; 2 3 4 ; 3 4 5 ; 4 5 6 ; ... ; ... ;17 18 19 ; 18 19 20 ]
assuming p = 3 and r = 1
Does anyone know the name of this function ?
There was no iteration, or loop, it was just a simple function but very powerfull for a specified purpose : - )
Thank you in advance to help me to get my lucky charm back
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!