%script that demonstrates a double for loop

% let's create a matrix that contains as the elements multiples of 3
nrCols = 4;
nrRows = 3;

matrix = zeros(nrRows, nrCols);

element = 3;
for i = 1: nrRows
    for j = 1: nrCols
        matrix(i, j) = element;
        element = element + 3;
    end
end
disp(matrix)
