function [Cdelta] = specD(spec, T, Ncep)

% takes a power spectral matrix and obtains delta-spec

delta = diag_feat_T_F(spec, T, 0);

NLdelta = gauss_histn(delta);

Cdelta = dct(NLdelta);
Cdelta = Cdelta(1:Ncep,:);

Cddelta = diag_feat_T_F(Cdelta, max(T-1, 1), 0);

Cdelta = [Cdelta; Cddelta];

Cdelta = mean_var_norm(Cdelta);