Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

Examples:

 findPosition([1 3 5 4 2], 2)
 posX is 5
 findPosition([1 5 8 6 7 6 0], 8)
 posX is 3

Solution Stats

5640 Solutions

2813 Solvers

Last Solution submitted on Feb 14, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers2813

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!