File Exchange Pick of the Week

Our best user submissions

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Results for: Puzzler

Puzzler: Working with polynomials 11

Posted by Doug Hull,

This puzzler is very straightforward, so I hope to hear from some of the newer MATLAB users. I think the solution is very linear, most people would come up with the same solution. As a hint, be sure to look at our help for POLYDER and ROOTS.
The challenge…

Puzzler: Find largest connected island 25

Posted by Doug Hull,

Every now and then we send MATLAB challenges through the department to help sharpen our programming skills. What amazes me is the sheer variety of solutions that people come up with.
Today, I have a challenge for the community here. Given a matrix of random, positive, whole numbers,… read more >>

Puzzler: Overlapping rectangles 31

Posted by Doug Hull,

Today’s challenge is one where you need to figure out if two rectangles have a non-zero area of overlap.
The rectangles will be specified as follows:

Just fill in your part of the code until you get the binary variable overlap defined.

ax = sort(rand(1,2));
ay = sort(rand(1,2));
bx = sort(rand(1,2));
by = sort(rand(1,2));

rectangle(‘position’,[ax(1) ay(1) diff(ax)…

Puzzler: Data exploration 9

Posted by Doug Hull,

This is a puzzler without explanation. Brett got it in about five minutes, some of the other folks wandering near my office got it in just under 20.
The data to explore.
Remember to use the <pre><code> and </code></pre> tags around your code in the comments.

First solution in my mailbox as…

Puzzler: Six card poker 22

Posted by Doug Hull,

Update: This solution was found faster than expected. I have replaced the original with a stronger solution that I was holding in reserve. Congrats to DanK for solving the original ( found here in a zip). The contest is still running with the upgraded computerHand.p

I…

Puzzler: Coin game 11

Posted by Doug Hull,

This is a simplified version of the first problem I ever attempted to solve in MATLAB. For my original problem, I was trying to figure out the probability of being on any square in the board game Monopoly. That is a difficult problem from a book-keeping sense, but… read more >>