Diff of /gabor/wilwin.m [7c7a96] .. [3deeb5] Maximize Restore

  Switch to unified view

a/gabor/wilwin.m b/gabor/wilwin.m
...
...
173
    gorig = g{2};  
173
    gorig = g{2};  
174
    [g,info.auxinfo] = wilwin(gorig,M,L,callfun);    
174
    [g,info.auxinfo] = wilwin(gorig,M,L,callfun);    
175
    g = wildual(g,M,L);
175
    g = wildual(g,M,L);
176
    
176
    
177
    % gorig can be string or cell array
177
    % gorig can be string or cell array
178
    if info.auxinfo.isfir 
178
    if info.auxinfo.isfir && test_isfir(gorig,M)
179
    % Original window is FIR, dual window is FIR if length of the original
180
    % window is <= M. This is true if the length was not explicitly
181
    % defined (gorig{2}).
182
      if iscell(gorig) && numel(gorig)>1 && isnumeric(gorig{2}) && gorig{2}<=2*M...
183
         || ischar(gorig)   
184
        info.isfir = 1; 
179
        info.isfir = 1; 
185
      end
186
    end
180
    end
187
    
181
    
188
    info.isdual=1;
182
    info.isdual=1;
189
   case {'tight'}
183
   case {'tight'}
184
    gorig = g{2};
190
    [g,info.auxinfo] = wilwin(g{2},M,L,callfun);    
185
    [g,info.auxinfo] = wilwin(g{2},M,L,callfun);    
191
    g = wilorth(g,M,L);  
186
    g = wilorth(g,M,L);  
192
    % The same as for dual?
187
    % gorig can be string or cell array
188
    if info.auxinfo.isfir && test_isfir(gorig,M)
189
        info.isfir = 1; 
190
    end
193
    info.istight=1;
191
    info.istight=1;
194
   case firwinnames
192
   case firwinnames
195
    g=firwin(winname,g{2},'energy',g{3:end});
193
    g=firwin(winname,g{2},'energy',g{3:end});
196
    info.isfir=1;
194
    info.isfir=1;
197
   otherwise
195
   otherwise
...
...
226
  
224
  
227
  if isempty(L)
225
  if isempty(L)
228
    error(['%s: You must specify a length L if a window is represented as a ' ...
226
    error(['%s: You must specify a length L if a window is represented as a ' ...
229
           'text string or cell array.'],callfun);
227
           'text string or cell array.'],callfun);
230
  end;
228
  end;
229
  
230
  function isfir=test_isfir(gorig,M)
231
    % Original window is FIR, dual window is FIR if length of the original
232
    % window is <= M. This is true if the length was not explicitly
233
    % defined (gorig{2}).
234
    if iscell(gorig) && numel(gorig)>1 && isnumeric(gorig{2}) && gorig{2}<=2*M...
235
         || ischar(gorig)   
236
        isfir = 1; 
237
    else
238
       isfir = 0;
239
    end
231
240