LazyWeb: Closed challenges
Lazy web is a concept where you put requests out and see if anyone else has made the code you are looking for, or might be looking for that little push to start working together on that code.
Send me a concise description of a function you would like to see written for MATLAB. Better yet, donate the code that is requested by people. See the open and closed challenges pages for examples.
CHALLENGE 1
Dear LazyWeb,
I would like to have a function like this:
—–
function makeLineHighlightable(h)
MAKELINEHIGHLIGHTABLE Highlight a line when clicked on.
h can a vector of line handles, or an axes handle. MAKELINEHIGHLIGHTABLE will set a buttondownfcn callback on the line(s) (or all lines in the axes) such that when you click on it the line width will go up a couple of points so it is easier to see. Clicking on a highlighted line, will cause it to go back to normal. Clicking on a non-highlighted line will cause any other highlighted lines in the axes to go back to normal.
Thanks!
Doug
SOLUTION 1
MakeLineHighlightable
by
Matthew
CHALLENGE 2
Dear LazyWeb,
I would like a hand ranker for poker hands of 2-7 cards. The input format can be anything, from a binary matrix representing the cards chosen from a 52 card deck, to a list of the cards (ie. 1, 23, 52). The function would need to take either a single hand, or a set of hands and output an absolute rank of all possible hands, so a royal flush would be rank 1, and [2 3 4 5 7] of different suits would be the absolute worst hand (maybe rank 23,456,421,356). The program should be able to look at a seven card hand and find the ranks of all of the five card hands that are possible from it (same with two card hands, etc).
This should, of course, be lightning fast. If it makes it easier, the ranks do not have to be continuous (ie. There might not be a hand with rank 34 for some reason, so long as the output is easily comparable to one another. Maybe you have a vector that had five values [1 for straight flush, 2 for four of a kind, etc…, the second value would give the tie breaker within the first rank like 1 for Quad Aces, 2 for Quad kings], there would be as many tie breakers as need until each hand was unambiguously ranked).
Should be able to get a word description of the hand also, “Pair of twos with an Ace, Jack, Five kicker”
Thanks,
Doug
SOLUTION 2
Poker hand ranker
by
Rob
CHALLENGE 3
Dear LazyWeb:
I really like the paper “The End of the Rainbow? Color Schemes for Improved Data Graphics” by A. Light and P.J. Bartlein (see http://geography.uoregon.edu/datagraphics/EOS/Light&Bartlein_EOS2004.pdf). In it, the authors describe some pitfalls of colormap design, and then they provide some nice example colormaps of well-designed colormaps.
Please make me a file that creates the five colormaps shown in Figure 2. Each colormap should take an input that will let me make it arbitrarily long (just like HSV or GRAY in the MATLAB toolbox). Naming colormaps is tricky. Maybe you can give them names like DivergingRedBlue or SingleHuePurple.
Thanks,
Ned
SOLUTION 3
Movie and MakeColorMap
by
Doug
and
Light Bartlein Color Maps
by
Robert