Diff of /wavelets/conv_td_sub.m [824cc5] .. [62fbef] Maximize Restore

  Switch to side-by-side view

--- a/wavelets/conv_td_sub.m
+++ b/wavelets/conv_td_sub.m
@@ -13,6 +13,7 @@
 %
 %   Output parameters:
 %         out      : length(filts) cell-array containing outputs
+%                    if just 1 filter is provided, the output is vector.
 %
 %   Calculates length(filts)-channel analysis filterbank response followed by
 %   subsampling with the factor *sub*. Filter impulse
@@ -20,19 +21,30 @@
 %   filter position is given by *skip*. Optionally *filtUps* introduces
 %   filter impulse response upsampling.
 
+
 noOfFilts = length(filts);
 fLen = length(ups(filts{1},filtUps,1));
 inLen = length(in);
-out = cell(noOfFilts,1);
-for ff=1:noOfFilts
-  out{ff} = zeros(outLen,1);
+
+if(noOfFilts>1)
+  out = cell(noOfFilts,1);
+  for ff=1:noOfFilts
+     out{ff} = zeros(outLen,1);
+  end
+else
+   out = zeros(outLen,1);
 end
+
 inExt = extendBoundary(in,fLen-1,ext);
 
 for ff=1:noOfFilts
     outTemp = conv(inExt,ups(filts{ff}(:),filtUps,1));
     outTemp = downs(outTemp(fLen+skip:end-fLen+1),sub,1);
     toWrite = min([length(outTemp),outLen]);
-    out{ff}(1:toWrite) = outTemp(1:toWrite);
+    if(noOfFilts>1)
+       out{ff}(1:toWrite) = outTemp(1:toWrite);
+    else
+       out(1:toWrite) =  outTemp(1:toWrite);
+    end
 end