x is a vector of unknown length

your function should return the index of the first element in the vector that is greater than 6. If all elements in x are less than 6, the function should return 'none'

example: x = [1 2 7 2 3 2 4 8 6]

output = 3

Solution Stats

536 Solutions

202 Solvers

Last Solution submitted on Feb 10, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers202

Suggested Problems

More from this Author28

Problem Tags

Community Treasure Hunt

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

Start Hunting!