%% Multiplication table using array indexing
%
% Author: Paul Talaga
%
% Change width and height for smaller matrices


clear all;
tic();

width = 10000;      % 10000x10000 takes about 0.3 seconds to compute
height = 10000;

matrix2 = zeros(height, width);



matrix2(:,1) = 1:height;

for x = 2:width
       matrix2(:,x) = matrix2(:,1) * x;
end
toc();