how to find the max and min numbers by comparing each and every adjacent element in an array?
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
See Also
Categories
Find more on Time Series Collections 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!