This solution is outdated. To rescore this solution, sign in.
-
2 Comments
William
on 17 Dec 2012
Why is this wrong? I produced a 5x5 checkerboard matrix when n=5 and a 4x4 checkerboard matrix when n=4.
Aneesh Balaji
on 17 Dec 2012
This is because you have semicolon beside if statement and also you are checking only the second element of each row.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!