Diff of /comp/comp_window.m [7c7a96] .. [3deeb5] Maximize Restore

  Switch to unified view

a/comp/comp_window.m b/comp/comp_window.m
...
...
94
      g = gabdual(g,a,M,L);
94
      g = gabdual(g,a,M,L);
95
    else
95
    else
96
      g = gabdual(g,a,M,L,'lt',lt);
96
      g = gabdual(g,a,M,L,'lt',lt);
97
    end;
97
    end;
98
    % gorig can be string or cell array
98
    % gorig can be string or cell array
99
    if info.auxinfo.isfir 
99
    if info.auxinfo.isfir && test_isfir(gorig,M) 
100
    % Original window is FIR, dual window is FIR if length of the original
101
    % window is <= M. This is true if the length was not explicitly
102
    % defined (gorig{2}).
103
      if iscell(gorig) && numel(gorig)>1 && isnumeric(gorig{2}) && gorig{2}<=M...
104
         || ischar(gorig)   
105
        info.isfir = 1; 
100
       info.isfir = 1; 
106
      end
107
    end
101
    end
108
    info.isdual=1;
102
    info.isdual=1;
109
   case {'tight'}
103
   case {'tight'}
110
    gorig = g{2};
104
    gorig = g{2};
111
    [g,info.auxinfo] = comp_window(gorig,a,M,L,lt,callfun);    
105
    [g,info.auxinfo] = comp_window(gorig,a,M,L,lt,callfun);    
...
...
113
      g = gabtight(g,a,M,L);
107
      g = gabtight(g,a,M,L);
114
    else
108
    else
115
      g = gabtight(g,a,M,L,'lt',lt);
109
      g = gabtight(g,a,M,L,'lt',lt);
116
    end;
110
    end;
117
    % The same as in dual?
111
    % The same as in dual?
112
    if info.auxinfo.isfir && test_isfir(gorig,M) 
113
       info.isfir = 1; 
114
    end
118
    info.istight=1;
115
    info.istight=1;
119
   case firwinnames
116
   case firwinnames
120
    g=firwin(winname,g{2},'energy',g{3:end});
117
    g=firwin(winname,g{2},'energy',g{3:end});
121
    info.isfir=1;
118
    info.isfir=1;
122
   otherwise
119
   otherwise
...
...
151
  
148
  
152
  if isempty(L)
149
  if isempty(L)
153
    error(['%s: You must specify a length L if a window is represented as a ' ...
150
    error(['%s: You must specify a length L if a window is represented as a ' ...
154
           'text string or cell array.'],callfun);
151
           'text string or cell array.'],callfun);
155
  end;
152
  end;
153
  
154
  
155
function isfir=test_isfir(gorig,M)
156
    % Original window is FIR, dual window is FIR if length of the original
157
    % window is <= M. This is true if the length was not explicitly
158
    % defined (gorig{2}).
159
      if iscell(gorig) && numel(gorig)>1 && isnumeric(gorig{2}) && gorig{2}<=M...
160
         || ischar(gorig)   
161
        isfir = 1; 
162
      else
163
         isfir = 0;
164
      end
156
165
157
166
167