You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: recWave2D.m
    path of file: ./repos/iptutorials/MASTER_mispa/TUT.IMG.wavelets/matlab
    
    the code of the file until where you have to start completion: %% 2D simple wavelet reconstruction
function A = recWave2D(LcLrA, HcLrA, LcHrA, HcHrA, lr, hr)
% Reconstruction of an image from lr and hr filters and from the wavelet
% decomposition.
% A
    
function A = recWave2D(LcLrA, HcLrA, LcHrA, HcHrA, lr, hr)
% Reconstruction of an image from lr and hr filters and from the wavelet
% decomposition.
% A: resulting (reconstructed) image
%
% NB: This algorithm supposes the number of pixels in x and y dimensions is
% a power of 2.

[sx, sy] = size(LcLrA);

%% Allocate temporary matrices
LrA = zeros(sx*2, sy);
HrA = zeros(sx*2, sy);
A   = zeros(sx*2, sy*2);

%% Reconstruct from cols
for j=1:sy,
    LrA(:,j) = waveSingleRec(LcLrA(:,j), HcLrA(:,j), lr, hr);
    HrA(:,j) = waveSingleRec(LcHrA(:,j), HcHrA(:,j), lr, hr);
end