Code covered by the BSD License  

Highlights from
Circular convolution using DCT and DST

from Circular convolution using DCT and DST by Reju VG
circular convolution using Discrete sine and cosine transforms

DST2e(x)
function f = DST2e(x)
%Calculation of DST2e using DCT2e.
%Reference Z. Wang, A fast algorithm for the discrete sine transform implemented
% by the fast cosine transform, IEEE Trans. Acoust., Speech, Signal
% Processing, vol. ASSP-30, pp. 814-815, 1982.

N=length(x);

s(1:2:N,1)=1;
s(2:2:N,1)=-1;

x=x.*s;
f=DCT2e(x);
f=flipud(f);

Contact us