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...
Renaming a field in a structure array
Tell me the slope
Create a vector whose elements depend on the previous element
Generate a NaN...on purpose
Is this group simply connected?
Placing Beads Neatly in a Box
Find the stride of the longest skip sequence
Make a function that returns its own character count
Beads on a Necklace (Convex Hulls)
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