How Can I count the ascending runs in array ?
2 views (last 30 days)
Show older comments
if I have an array such as
x=[1 2 3 2 1 2 4 5]
I would generate a binary array for binary search
binaryarray= [1 1 1 0 0 1 1 1]
in binaryarry i would sign 1 along with ascending runs while 0 along with descending runs.
2 Comments
See Also
Categories
Find more on Software Development Tools 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!