Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 1
1 0 0 0 0
...
3 years 前
已解决
Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 1
1 0 0 0 0
...
3 years 前
已解决
Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1.
example:
x=4
ans=
[1 1 1 0
1 0 0 1
1 0 0 1
1 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 '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 前
已解决
Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be.
Ex...
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
3 years 前
已解决
Convert a Cell Array into an Array
Given a square cell array:
x = {'01', '56'; '234', '789'};
return a single character array:
y = '0123456789'
Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column:
in:
...