How Can I count the ascending runs in array ?
    3 次查看(过去 30 天)
  
       显示 更早的评论
    
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.
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


