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

📄 fht.m

📁 压缩文件中是Error Correction Coding - Mathematical Methods and Algorithms(Wiley 2005)作者:(Todd K. Moon )的配
💻 M
字号:
function F = fht(f)%  function F = fht(f)% Compute the fast Hadamard transform of the vector f,% where the length of f must be a power of 2% % This transform actually works "in place"% Todd K. Moon, March 24, 2004% Copyright 2004 by Todd K. Moon% Permission is granted to use this program/data% for educational/research onlyn = length(f);m = log2(n);  % number of stages of iterationF = f;									% reserve space for transform for i=0:m-1								% count over the stagesi  skip = 2^i; 							% amount to "skip" in indexingskip  j = 0;j  while(j < n)	j1 = j;j1	for k1=0:(2^i-1) 					% number adjacent H2 steps	  	  tmp = F(j1+1); 					% do the H2 transform	  F(j1+1) = F(j1+1) + F(j1+skip+1); 	  F(j1+skip+1) = tmp - F(j1+skip+1);	  j1 = j1+1;	end	j = j + 2*skip;  endend

⌨️ 快捷键说明

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