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...
Calculate the area of a triangle between three points
Create an n-by-n null matrix and fill with ones certain positions
03 - Matrix Variables 6
Find a Pythagorean triple
Calculate Amount of Cake Frosting
Eliminate Polysyllabics: Long live short words!
The 17x17 Problem
Find the Final State of an Abelian Sandpile
Encoding Google Maps Polylines
Placing Beads Neatly in a Box
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