Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
2 years ago
Solved
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:
...
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...
2 years ago
Solved
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....
Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...
2 years ago
Solved
Find Logic 14
Guess the Logic!
logic(1) = 100
logic(2) = 96
logic(3) = 105
logic(4) = 89
logic(5) = 114
Make a function logic(x) which w...