How to make checkboard with only 2 black box and white box using for loop
Show older comments
I am trying to make checkboard for only 2 black box and 2 white box diagonally using for loop the output i need to have is on this link thanks
1 Comment
Jan
on 12 Mar 2017
Is this a homework question? Why do you need a for loop?
Answers (2)
Jan
on 12 Mar 2017
Without a for loop:
v = (1:128) > 64;
r = xor(v, v.'); % Auto expanding in Matlab 2016b
% r = bsxfun(@xor, v, v.') % Older Matlab versions
abid rashid
on 12 Mar 2017
0 votes
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!