On 02/27/2020 08:12 PM, Richard (Rick) Lyons wrote:> Hello Johann. > I can only make your Feb 26, 2020 code work if I multiply your final 'retval' sequence by an n-length sequence of 1, -1, 1, -1, ... . That is, in MATLAB code: > > retval = (-1).^(0:n-1).*retval; >Because it's a function file to drop somewhere for octave to load. It's just the T_N function, not your added phase shift.