Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /wavelets/wpfbtclength.m [000000] .. [191c94] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/wavelets/wpfbtclength.m
@@ -0,0 +1,33 @@
+function [Lc,L]=wpfbtclength(Ls,wt,varargin)
+%WFBTLENGTH  WPFBT subband length from a signal length
+%   Usage: L=wfbtlength(Ls,wt);
+%          L=wfbtlength(Ls,wt,...);
+%
+%   `[Lc,L]=wpfbtclength(Ls,wt)` returns the length *L* of a wavelet system
+%   that is long enough to expand a signal of length *Ls* and associated
+%   vector subband lengths *Lc*. Please see the help on
+%   |wfbt| for an explanation of the parameter *wt*.
+%
+%   If the returned length is longer than the signal length, the signal
+%   will be zero-padded by |wfbt| to length *L*.
+%
+%   See also: wfbt, fwt
+
+
+definput.import = {'fwt'};
+[flags,kv]=ltfatarghelper({},definput,varargin);
+
+% Initialize the wavelet filters structure
+wt = wfbtinit(wt);
+
+if(flags.do_per)
+   a = treeSub(wt);
+   L = filterbanklength(Ls,a);
+else
+   L = Ls;
+end
+
+wtPath = nodesBForder(wt);
+Lc = nodeOutLen(wtPath,L,[],flags.do_per,wt);
+
+