extendproj.sci

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

SCI
60
字号
function extproj = ExtendProj(projj,n,windows,sympts,sym)
// Extendproj -- Extend a projection to all of the integers -n/2+1 -> n/2
//  Usage
//    extproj = ExtendProj(projj,n,windows,sympts,sym)
//  Inputs
//    projj     windowed projection vector
//    n        length of full signal
//    windows   string selecting windows used in windowing projection
//             'm' -> mother, 'f' -> father, 't' -> truncated mother
//    sympts   points of symmetry and antisymmetry of projection
//    sym      string: symmetry type; 'e' -> even ;'o' -> odd
//  Outputs
//    extproj extended projection of length n
//
// See Also
//    CoarseMeyerProj, DetailMeyerProj, FineMeyerProj
//
//  Copyright Aldo I Maalouf

	if ( windows == 'm' ),
	  nj = sympts(2);
	  frontlength = nj/4 + floor(nj/12) + 1;
	  backlength  = n/2 - (nj + floor(nj/3) );
	  pospart = [ zeros(1,frontlength) projj zeros(1,backlength) ];
	elseif ( windows == 'f' ),
	  frontind = [(length2(projj)+1)/2:length2(projj)];
	  backlength = n/2 + 1 - length2(frontind);
	  pospart = [ projj(frontind) zeros(1,backlength) ];
	elseif ( windows == 't' ),
	  nj1 = sympts(1);
	  frontlength = n/2 - ( nj1 + floor(nj1/3) );
	  pospart = [ zeros(1,frontlength) projj ];
	else 
	'Window not of type m, f, or t !'
	end
	
	if ( sym == 'e' ),
	  extproj = [  pospart  mtlb_fliplr(waverow(pospart(2:n/2))) ];
	elseif ( sym == 'o' ),
	  extproj = [  pospart -mtlb_fliplr(waverow(pospart(2:n/2))) ];
	else
	'Even (e) or Odd (o) are the only symmetry choices !'
	end

//
//  Prepared for the thesis of Eric Kolaczyk, Stanford University, 1994
//  Copyright (c) Eric Kolaczyk, 1994.
//

    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 + =
减小字号Ctrl + -
显示快捷键?