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

📄 packbasiscoeff.sci

📁 小波分解源代码
💻 SCI
字号:
function pkt = PackBasisCoeff(basis,opkt,x)
// PackBasisCoeff -- Stuff basis coefficients into packet table
//  Usage
//    pkt = PackBasisCoeff(btree,opkt,x)
//  Inputs
//    btree     basis tree selecting basis the coefficients come from
//    opkt      wavelet or cosine packet table
//    x         1-d signal; coefficients in the basis of btree
//  Outputs
//    pkt       new packet table with coefficients in specified
//              basis filled in from x
//
//  Description
//    Fill the packet table coefficients specified
//    by the basis tree btree with the contents of x.
//
//  Copyright Aldo I Maalouf

	[n,L] = size(opkt);
	pkt   = opkt;

	// initialize tree traversal stack
	dstack = zeros(1,2^L);
	bstack = zeros(1,2^L);

	// pushdown root
	k = 1;
	dstack(k) = 0;
	bstack(k) = 0;

	while(k > 0),
	
		// pop stack
		d = dstack(k); 
		b = bstack(k); 
		k = k-1;

		if(basis(node(d,b)) == 0) ,  
			// terminal node: extract coeff
			pkt(packet(d,b,n),d+1) =  x(packet(d,b,n))';
		else
			// nonterminal node: visit children
			k = k+1;
			dstack(k) = d+1; bstack(k) = 2*b;
			k = k+1;
			dstack(k) = d+1; bstack(k) = 2*b+1;
		 end
	end

//
// Copyright (c) 1993. David L. Donoho
// 
    
endfunction 
//   
// Part of WaveLab Version 802
// Built Sunday, October 3, 1999 8:52:27 AM
// This is Copyrighted Material
// For Copying permissions see COPYING.m
// Comments? e-mail wavelab@stat.stanford.edu
//   
    

⌨️ 快捷键说明

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