Split array in subarrays According to condition
15 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody,
I'm currently trying to split an arrays into multiple sub-arrays. I have a 10500000x2 array an I need data from column 1. in Column 2 there are just 1s and 2s that form some kind of puls signal. I now want to have a subarray for each "pulse" where column2 is equal 2. I added the matrix and hope I was able to express my problem.
Thanks
0 件のコメント
回答 (1 件)
Robert U
2018 年 6 月 12 日
Hi SmaShBr0ther:
The requested functionality is obtained by logical indexing
Applied to your example file:
subarray = Example(Example(:,2)==2,:);
Kind regards,
Robert
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Array Geometries and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!