I have drawn five boxes using rectangle function writing code for each box. This doesn't look elegant however. I'm thinking I could use structures and loop to draw these boxes. I have just started learning about structures. This one seems to out of scope of what I've learned so far. Could anyone help me out?
% Row of Boxes: Steps: 1 to 5
rectangle('Position', [1 22 20 20], 'FaceColor', [0.6 0.7 0.5], 'EdgeColor', [0.9 0.1 0.1], 'LineWidth', 1.5);
rectangle('Position', [22 22 20 20], 'FaceColor', [0.6 0.7 0.5], 'EdgeColor', [0.9 0.1 0.1], 'LineWidth', 1.5);
rectangle('Position', [43 22 20 20], 'FaceColor', [0.6 0.7 0.5],... 'EdgeColor', [0.9 0.1 0.1], 'LineWidth', 1.5);
rectangle('Position', [64 22 20 20], 'FaceColor', [0.6 0.7 0.5],... 'EdgeColor', [0.9 0.1 0.1], 'LineWidth', 1.5);
rectangle('Position', [85 22 20 20], 'FaceColor', [0.6 0.7 0.5],... 'EdgeColor', [0.9 0.1 0.1], 'LineWidth', 1.5);