The total length of the functions is (size(lof,1)-1)*2^iteration+1. The function support (non-zero part) is (2^iteration -1)*nf-2^iteration+2, shorter than total length. One 'zero' is then added at the beginning and multiple 'zeros' are added at the end.
function scalingWaveFunc input Types.wavletID wavID = 1 "Id-Number of the wavelet. Necessary only for discrete Meyer wavelet"; input Real lof[:] = {0.707, 0.707} "Wavelet low pass filter"; input Real hif[:] = {-0.707, 0.707} "Wavelet high pass filter"; input Integer iteration = 6 "Iteration of the calculations for generating the functions"; output Real x[:] "Equidistant grid of the functions"; output Real phi[:] "The scaling function"; output Real psi[:] "The wavelet function"; end scalingWaveFunc;