How Can I count the ascending runs in array ?
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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 comentarios
Ver también
Categorías
				Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


