rearranging the data in separate columns when difference of 10 is found in vector
Show older comments
I have data like: 1,2,3,4,5,7,8,11,13,14,15,17,18,19,21,23,24,25...36..,
Here, I would like to divide this series into columns as soon as the difference of ten from the initial number is found in the vector. I.e: Column one will contain, 1,2,3,4,5,7,8,11 and Column 2 will 13,14,15,17,18,19,21,23,24 and third column the values from 25...36 and so forth.
Any hints or example code would be highly helpful.
Accepted Answer
More Answers (1)
DJ_LAB
on 6 Feb 2012
0 votes
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!