% Wavelet transform in dimension one, just one step
%
% Arguments:
% f    the signal (a vector of power-of-two length)
% h    high-pass filter
% g    low-pass filter
%
% Returns:
% LP   low-pass filtered and downsampled part
% HP   high-pass filtered and downsampled part
%
% Samuli Siltanen October 2016

function [LP,HP] = Wavelet_tr_onestep(f,h,g)

% Convolution for the low-pass part
LP = conv2(f,h,'same');

% Downsampling for the low-pass part
LP = LP(1:2:end);

% Convolution for the high-pass part
HP = conv2(f,g,'same');

% Downsampling for the high-pass part
HP = HP(1:2:end);

