% Create a mesh grid from length and width
% l = 1 , 3 , 5
% w = 2, 4, 6 ,8
% output = the area of all rectangles
clc, clear;
disp('Initial values of l and w');
l = [1 3 5]
w = [2 4 6 8]

% Example using meshgrid
disp('new_l and new_w using meshgrid(l, w)');
[new_l, new_w] = meshgrid(l, w)
pause;
disp('Area when using meshgrid(l, w)');
a = new_l.*new_w;
disp(a);
pause;
%Change dimensions
disp('new_l and new_w using meshgrip(w, l)');
[new_w, new_l] = meshgrid(w, l)
pause;
disp('Area when using meshgrid(w, l)');
a = new_l.*new_w;
disp(a);
