Coding wavelets the easy way

The solution of the exercise is

function y = myconv(x,f)
% convolves two signals
% signals are structs with two elements
% d is the opposite of the lowest degree of the z-transform of the signal
% (this implies a delay if it is nonegative)
% if the lowest degree is positive strictly, it is assumed that the signal
% has been padded with zeros so that d = 0
% As a consequence, the structure is not causal if and only if d>0
% s is the signal on its support
y.d = x.d + f.d;
y.s = conv(x.s,f.s);