- /
-
Solution of 8 queens
on 14 Oct 2022
- 1
- 9
- 1
- 0
- 203
n=8;
Mat=[128 0;0 128];
Mat=repmat(Mat,[n/2 n/2 3]);
y=[5,1,8,4,2,7,3,6];
for i=1:n
r=i;
c=y(i);
Mat(r,c,1)=255;
Mat(r,c,2)=0;
Mat(r,c,3)=0;
end
imagesc(Mat)
title('Thanks , Please Vote For Me')
xlabel('Solution of 8 queens')