Problem 1078. Make a diamond
Solution Stats
Problem Comments
-
4 Comments
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.
Solution Comments
-
1 Comment
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?
Problem Recent Solvers68
Suggested Problems
-
Back to basics 6 - Column Vector
979 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
485 Solvers
-
Getting the indices from a vector
5843 Solvers
-
Generate N equally spaced intervals between -L and L
712 Solvers
-
225 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!