Problem 61034. The MATLAB Treasure Hunt – Identify the Hidden Pattern Within the Maze of Numbers

The compass leads you to an underground chamber covered in numbers carved into the walls — a maze of digits that glows in mysterious patterns.
The inscription reads: “Only the even paths shall open.”
Given a vector a of numbers, extract and return a new vector b containing only the even numbers, preserving their original order.
These even numbers form the correct path through the Maze of Numbers.

Solution Stats

85.71% Correct | 14.29% Incorrect
Last Solution submitted on Oct 25, 2025

Solution Comments

Show comments

Problem Recent Solvers12

Suggested Problems

More from this Author22

Community Treasure Hunt

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

Start Hunting!