love this one
28 attempts later, we finally made it
zeros are added to convert a logical to double.
The first time I see this kind of bsxfun.
Looks like I have the lamest possible solution!
I think it would be funny to see this solution in action by an animation of iterations! :-)
this breaks with nan's, solution 6118 does not
There is a bug in this Problem
function b = bubbles(a)
b = ;
Passes the test.
One needs to check: b_correct ~= .
To the sort User :
[-1 0]' would come out [ -1 0] '
need to fix the test suite to include non-sorted non-zero elements
wishful thinking: perhaps sort 'should' behave like relational operators...
03 - Matrix Variables 2
04 - Scalar Equations 1
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
Cell Counting: How Many Draws?
Make a function that returns its own character count
Beads on a Necklace (Convex Hulls)
Placing Beads Neatly in a Box
Simulate one complete step in the Biham–Middleton–Levine traffic model
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office