Split array into multiple columns based on another array

2 views (last 30 days)
Hi, I have 2 double arrays, 1 array (DHB_combine)is values and the other is index (index_combine). I want to split DHB_combine into multiple columns based on the index.

Accepted Answer

Matt J
Matt J on 11 Sep 2019
Edited: Matt J on 11 Sep 2019
result = splitapply(@(x) {x}, DHB_combine,index_combine);

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!