Thomas Cornish

54170
Rank
2
Badges
30
Score
1 – 4 of 4

Thomas CornishreceivedSolverbadge forSolution 2182335

on 30 Mar 2020

Thomas Cornishsubmitted aCommenttoProblem 4. Make a checkerboard matrix

%% cherboard function [board] = Chekerboard(n) %% set bord matrix with zeros board = zeros(n,n); for j = 1:n if mod(j,2)==0 %if zero row is even for i =1:2:n board(j,i) = 1; end else mod(j,2)==1 %if 1, row is odd for t = 2:2:n board(j,t) = 1; end end end

on 30 Mar 2020

1 – 4 of 4