may I suggest reinforcing your test suite using isequal or strcmp to hardcoded diamond strings?
updated!
its unclear what the problem wants plz fix
Needs better test suite rather than just checking random things (which is better suited to be the secondary fail safe not the primary).
This is just lazy from the OP.
why is the first test showing error while others passing :
assert(all(find(double(make_diamond(3)) == 0) == [1 3 5 7 9]') == 1)
Matrix dimensions must agree. Error in Test1 (line 4) assert(all(find(double(make_diamond(3)) == 0) == [1 3 5 7 9]') == 1)
what is this supposed to mean? Am I missing something?
900 Solvers
Create a matrix X, where each column is a shifted copy of the vector v
142 Solvers
Split a string into chunks of specified length
477 Solvers
Create an n-by-n null matrix and fill with ones certain positions
271 Solvers
373 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!