⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dct_ii.sci

📁 小波分解源代码
💻 SCI
字号:
function c = dct_ii(x)
// dct_ii -- Discrete Cosine Transform of Type II
//  Usage
//    c = dct_ii(x)
//  Inputs
//    x     signal of dyadic length
//  Outputs
//    c     discrete cosine transform, type II, of x
//
//  Description
//    The form c = dct_ii(x) computes c defined by
//        c_m = sqrt(2/N) * sum_n x(n) k_m cos( pi * m (2n+1) / 2N )
//    where 
//        0 <= m,n <= N-1,  N = length(x) = length(c)
//    and k_m = [ 1           if 1 <= m <= N-1
//              [ 1/sqrt(2)   if m = 0 
//
//   The dct_ii is inverted by the dct_iii.
//
//  See Also
//    DetailMeyerCoeff, FineMeyerCoeff
//
//  Copyright Aldo I Maalouf

	n   = length2(x);
	rx  = matrix([ zeros(1,n) ; x ],1,2*n);
	y   = [rx zeros(1,2*n)];
	w   = real(mtlb_fft(y));
	c   = sqrt(2/n)*w(1:n);
	c(1)= c(1)/sqrt(2);

endfunction
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -