wpmpursuittour.sci

来自「小波分解源代码」· SCI 代码 · 共 42 行

SCI
42
字号
function [atomic,resid] = WPMPursuitTour(x,D,qmf,natom,titlestr)
// WPMPursuitTour -- Wavelet Packet atomic decomposition
//  Usage
//    [wp, btree] = WPMPursuitTour(Format,x,D,qmf [,maxits,title])
//  Inputs  
//    x       1-d signal to analyze by Wavelet Packets
//    D       fineness of frequency splitting
//    qmf     quadrature mirror filter (e.g. Coiflet c3)
//    natom   maximum number of atoms to extract by Matching Pursuit
//    title   name of signal
//  Outputs 
//    atomic  atoms list, wavelet packet dictionary (see WPPursuit)
//    resid   residual
//
//
//  See Also
//    WPAnalysis, BestBasis, PlotPhasePlane, PlotBasisTree
//
//  Copyright Aldo I Maalouf

	n = length2(x);
	[atomic,resid] = WPPursuit(x,D,qmf,natom,.001,0);

	signaltitle = [ 'MP; WP Dict.; ' titlestr];
	PlotSynthesisTable('WP',atomic,n,D,0.,signaltitle);
//
	wp = WPAnalysis(resid,D,qmf);
	PlotPacketTable(wp);
	signaltitle = [ 'MP Residuals ; WP Dict.; ' titlestr];
	xtitle(signaltitle); 
	xtitle('','Frequency[Time]','Split Level')
	//ylabel('Split Level'); xlabel('Frequency[Time]')
//
	energy = sum(x.^2);
	compressnumbers = [energy ; (energy - cumsum(atomic(:,1).^2))];
	mtlb_plot(log(compressnumbers));
	xlabel('m','Compression Numbers','log(c_m)'); 
	//ylabel('log(c_m)'); title('Compression Numbers')

	PlotAtomicPhase('WP',atomic,n,titlestr)
	endfunction

⌨️ 快捷键说明

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