function [ splitImg ] = combineVectorized( leftImg, rightImg )
%COMBINEVECTORIZED Merge image1 and image2 into a single image.
% The left side of the merged image is the left side of image1 and the
% right side is the right side of image2. Use indexing to copy sections
% of the input images to the corresponding sections of the result.

columns = size( leftImg, 2 );
colMid = round( columns / 2 );

splitImg = rightImg;
splitImg( :, 1:colMid, : ) = leftImg( :, 1:colMid, : );

end

