how to find the max and min numbers by comparing each and every adjacent element in an array?

i have an array say A=[-2, 4, -5, 6] now i want to find the max and min value bewteen each adjacent numbers. for example, A=[-2,4,-5,6] answer should be between [-2,4] 4 is max and -2 is min and again between [4,-5] 4 is max and -5 is min

Respuestas (1)

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 19 de Oct. de 2015

Comentada:

el 19 de Oct. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by