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

Switch to side-by-side view

--- a/comp/comp_window.m
+++ b/comp/comp_window.m
@@ -96,14 +96,8 @@
       g = gabdual(g,a,M,L,'lt',lt);
     end;
     % gorig can be string or cell array
-    if info.auxinfo.isfir 
-    % Original window is FIR, dual window is FIR if length of the original
-    % window is <= M. This is true if the length was not explicitly
-    % defined (gorig{2}).
-      if iscell(gorig) && numel(gorig)>1 && isnumeric(gorig{2}) && gorig{2}<=M...
-         || ischar(gorig)   
-        info.isfir = 1; 
-      end
+    if info.auxinfo.isfir && test_isfir(gorig,M) 
+       info.isfir = 1; 
     end
     info.isdual=1;
    case {'tight'}
@@ -115,6 +109,9 @@
       g = gabtight(g,a,M,L,'lt',lt);
     end;
     % The same as in dual?
+    if info.auxinfo.isfir && test_isfir(gorig,M) 
+       info.isfir = 1; 
+    end
     info.istight=1;
    case firwinnames
     g=firwin(winname,g{2},'energy',g{3:end});
@@ -153,5 +150,18 @@
     error(['%s: You must specify a length L if a window is represented as a ' ...
            'text string or cell array.'],callfun);
   end;
+  
+  
+function isfir=test_isfir(gorig,M)
+    % Original window is FIR, dual window is FIR if length of the original
+    % window is <= M. This is true if the length was not explicitly
+    % defined (gorig{2}).
+      if iscell(gorig) && numel(gorig)>1 && isnumeric(gorig{2}) && gorig{2}<=M...
+         || ischar(gorig)   
+        isfir = 1; 
+      else
+         isfir = 0;
+      end
 
 
+

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks