File Exchange Pick of the Week

Our best user submissions


Will‘s pick this week is Maze by Rodney Meyer.

This simple submission is surprisingly effective at providing hours of diversion. From the command line, you call the maze function with arguments specifying dimensions and the maze pattern. The pattern (which can be horizontal, vertical, , checkerboard, spiral, burst, or random) influences the layout of a two-dimensional maze. A red diamond represents your pencil. You use the arrow keys to move your cursor through the maze from the upper left to bottom right. A timer lets you know how long it takes to complete the maze.

First Maze
It turns out that I’m not so good with mazes but I kept at it. After several attempts on a smaller maze, I finally did respectably.

Nailed it!
One person commented that the mazes were too simple. I ask them to try and solve this 120×160 maze!

I dare you
A couple further comments. One is that this submission was uploaded way back in 2005…and it still runs! The function only has a dozen warnings from the code analyzer. That’s some solid programming. So if you’re still out there, Rodney, I tip my hat to you. Now if you’re looking for a more recent take on labyrinths, check out this submission by the creator of MATLAB himself, Cleve Moler.

Let us know what you think here or leave a comment for Rodney.

  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.