Diff of /filterbank/filterbankwin.m [76dce7] .. [89ea83]  Maximize  Restore

Switch to unified view

a/filterbank/filterbankwin.m b/filterbank/filterbankwin.m
...
...
65
%
65
%
66
%     `info.isfac`
66
%     `info.isfac`
67
%        True if the frame generated by the window has a fast factorization.
67
%        True if the frame generated by the window has a fast factorization.
68
%
68
%
69
%   See also: filterbank, filterbankdual, filterbankrealdual
69
%   See also: filterbank, filterbankdual, filterbankrealdual
70
  
70
71
% TO DO: Why is there a realtype flag?
71
% Assert correct input.
72
% Assert correct input.
72
if nargin<2
73
if nargin<2
73
  error('%s: Too few input parameters.',upper(mfilename));
74
  error('%s: Too few input parameters.',upper(mfilename));
74
end;
75
end;
75
76
...
...
113
    end;
114
    end;
114
end;
115
end;
115
116
116
info.M=numel(g);
117
info.M=numel(g);
117
info.gl=zeros(info.M,1);
118
info.gl=zeros(info.M,1);
119
info.offset=zeros(info.M,1);
118
info.ispainless=1;
120
info.ispainless=1;
119
info.isfractional=0;
121
info.isfractional=0;
120
info.isuniform=0;
122
info.isuniform=0;
121
info.isfir=1;
123
info.isfir=1;
122
124
...
...
131
            g{m}.foff=g{m}.foff(L);
133
            g{m}.foff=g{m}.foff(L);
132
        end;
134
        end;
133
    else
135
    else
134
        info.ispainless=0;
136
        info.ispainless=0;
135
        info.gl(m)=numel(g{m}.h);
137
        info.gl(m)=numel(g{m}.h);
138
        info.offset(m)=g{m}.offset;
136
    end;
139
    end;
137
    
140
    
138
    % info.isfir==1 only if all filters are FIR
141
    % info.isfir==1 only if all filters are FIR
139
    if isfield(info_win,'isfir')
142
    if isfield(info_win,'isfir')
140
       if ~info_win.isfir && info.isfir
143
       if ~info_win.isfir && info.isfir
...
...
143
    end
146
    end
144
end;
147
end;
145
148
146
info.isfac=info.isuniform || info.ispainless;
149
info.isfac=info.isuniform || info.ispainless;
147
150
148
info.longestfilter=max(info.gl);
149
150
if info.isfractional && info.isuniform
151
if info.isfractional && info.isuniform
151
    error('%s: The uniform algorithms cannot handle fractional downsampling.', ...
152
    error('%s: The uniform algorithms cannot handle fractional downsampling.', ...
152
          upper(mfilename));
153
          upper(mfilename));
153
end;
154
end;
154
155
155
  
156
if info.isfir
157
   info.longestfilter=max(info.gl);
158
156
if L<info.longestfilter
159
   if L<info.longestfilter
157
  error('%s: One of the windows is longer than the transform length= %i.',upper(mfilename),info.longestfilter);
160
     error('%s: One of the windows is longer than the transform length= %i.',upper(mfilename),info.longestfilter);
161
   end;
158
end;
162
end

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks