File Exchange Pick of the Week

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... read more >>

Puzzler: Find largest connected island 26

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)); clf rectangle('position',[ax(1) ay(1) diff(ax)... read more >>

Puzzler: Data exploration solution 6

Posted by Jiro Doke,

This was a fun little puzzle. I wonder how many people got to the first image, but did not continue to the real solution! Contents Load the data and take... read more >>

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... read more >>

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... read more >>

Puzzler: Difficult algorithm development challenge 8

Posted by Doug Hull,

This week’s puzzler is significantly harder than others we have done in the past, I would be surprised (and delighted) to see an answer before I go home tonight… The challenge is shown below. Given a group of trees, find the rectangular bounding box in the x-y direction that holds... read more >>

MATLAB Puzzler: Finding the two closest points 29

Posted by Doug Hull,

Here is a new MATLAB Puzzler. Given two vectors representing the X and Y coordinates of some points, find the two closest points in Cartesian space. n = 10; x = rand(1,n); y = rand(1,n); Video Content Video Content Brett and I took very different paths to solving this... read more >>

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 >>

Wrap up on Puzzler: Removing columns and rows from binary matrices 1

Posted by Doug Hull,

The first puzzler [click here] was a big success with 33 comments added as I write this today. I wanted to go over some highlights from the comments and code that people put out there for critique. First off, I want to say that several people posted code that... read more >>

These postings are the author's and don't necessarily represent the opinions of MathWorks.