Answer:
clc
clear
size = input('Enter the number of boxes in a row : ');
for i=1:size
for j=1:size
if i==size-1 || j==2
rectangle('Position',[i*size,j*size,size,size],'FaceColor',[0,1,1],'EdgeColor','black',...
'LineWidth',3)
else
rectangle('Position',[i*size,j*size,size,size],'FaceColor',[1 1 1],'EdgeColor','black',...
'LineWidth',3)
end
end
end
Step-by-step explanation: