function
B = haar_row(A);
% This function performs sums and differences
row-wise for the Haar
% Transform.
The result is then placed back into the input matrix.
n =
length(A);
for i = 1:n
num = 1;
for j =
1:2:(n-1)
B(i,num)
= (A(i,j) + A(i,j+1))/sqrt(2);
B(i, num + n/2) = (A(i,j) -
A(i,j+1))/sqrt(2);
num = num + 1;
end
end