function D4()

x = 10:10:50;
y = 1:3;
z = 20:25;

disp('Example 1')
[shortV,longV] = checkLengths(x,y)

disp('Example 2')
[shortV,longV] = checkLengths(x,z)

disp('Example 3')
[shortV,longV] = checkLengths(z,y)

v = interleave(x,y)

v = interleave(y,z)

function [shortV,longV] = checkLengths(a,b)
% a and b are row vectors of different lengths
% shortV is the shorter vector
% longV is the longer vector

% Implement this

function v = interleave(a,b)
% a and b are row vectors with differnt lengths
% a and b are interleaved
% if length(a) < length (b) then (for example
% a = [ 1 2 3] , b = [20 21 22 23 24 25] then v = [20 1 21 2 22 3 24 25]
% if length(b) < length(a) then (for example)
% a = [20 21 22 23 24 25] b = [ 1 2 3] then v = [20 1 21 2 22 3 24 25]

% implement this