Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
3 years 前
已解决
~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator|
Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...
3 years 前
已解决
Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 0
1 0 0 0 1
...
3 years 前
已解决
Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 .
Example:
n=5
ans=
[1 0 0 0 1
1 1 0 0 1
1 0 ...
3 years 前
已解决
Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1.
example:
x=4
ans=
[0 1 1 1
1 0 0 0
...
3 years 前
已解决
Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2)
Example:
x=5
ans=
[1 0 0 0 1
1 0 0 0 1
...
3 years 前
已解决
Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 .
Example:
n=5
ans=
[0 0 0 0 1
0 0 0 0 1
0 0 ...
3 years 前
已解决
Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix.
example:
n=3
y=[1 0 1
0 1 0
1 0 1]
n=4
y=[1 0 0...