So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples:

x = [2 2 3 4 3 4 6 9 9]
y = [1 1 0 0 0 0 0 1 1]

or

x = [2 2 2 2 2 9]
y = [1 1 1 1 1 0]

Have fun!

Solution Stats

117 Solutions

59 Solvers

Last Solution submitted on Apr 02, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers59

Suggested Problems

More from this Author17

Community Treasure Hunt

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

Start Hunting!