Skip to content

Commit

Permalink
Doc updates and few new checks
Browse files Browse the repository at this point in the history
  • Loading branch information
susnak committed Dec 2, 2016
1 parent f527e68 commit 958f2a8
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
2 changes: 2 additions & 0 deletions filterbank/filterbankscale.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
% the input filters.
%

%AUTHOR: Zdenek Prusa

complainif_notenoughargs(nargin,2,'FILTERBANKSCALE');

definput.import={'normalize'};
Expand Down
16 changes: 16 additions & 0 deletions frames/frsyniter.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@
%
% 'quiet' Don't print anything, this is the default.
%
% Algorithms
% ----------
%
% The function uses the (Preconditioned) Conjugate Gradient algorithm
% to solve the following problem::
%
% .. FF*f=Fc
%
% .. math:: FF* f = Fc
%
% The preconditioning alters the equations such that
%
% .. inv(M)FF*f=inv(M)Fc
%
% .. math:: M^{-1}FF* f = M^{-1}Fc
%
% Examples
% --------
%
Expand Down
2 changes: 1 addition & 1 deletion frames/frsynmatrix.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
% *L*.
%
% The action of the frame analysis operator |frana| is equal to
% multiplication with the Hermitean transpose of the frame
% multiplication with the Hermitean transpose of the frame synthesis
% matrix. Consider the following simple example:::
%
% L=200;
Expand Down
15 changes: 10 additions & 5 deletions sigproc/firwin.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [g,info]=firwin(name,M,varargin);
function [g,info]=firwin(name,M,varargin)
%FIRWIN FIR window
% Usage: g=firwin(name,M);
% g=firwin(name,M,...);
Expand Down Expand Up @@ -165,12 +165,16 @@

if nargin<2
error('%s: Too few input parameters.',upper(mfilename));
end;
end

if ~ischar(name)
error('%s: First input argument must the name of a window.',upper(mfilename));
end;

error('%s: First input argument must the name of a window.',...
upper(mfilename));
end

if ~isnumeric(M)
error('%s: M must be numeric.',upper(mfilename));
end

% Always set to this
info.isfir=1;
Expand Down Expand Up @@ -205,6 +209,7 @@
end;

if numel(M)==1
complainif_notposint(M,'M',mfilename);

% Deal with tapering
if kv.taper<1
Expand Down
7 changes: 1 addition & 6 deletions sigproc/freqwin.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,12 @@
switch winName
case 'gauss'
H = exp(4*H.^2*log(bwrelheight)/(bw/step)^2);

case 'butterworth'
definputbutter.keyvals.order=4;
[~,~,order]=ltfatarghelper({'order'},definputbutter,winArgs);
H = 1./(sqrt(1 + (H/(bw/step/2)).^(2*order)));

case 'chebyschevI'
definputchebyI.keyvals.ripplefac = 0.01;
[~,~,ripplefac]=ltfatarghelper({'ripplefac'},definputchebyI,winArgs);


case 'gammatone'
definputgamma.keyvals.order=4;
[~,~,order]=ltfatarghelper({'order'},definputgamma,winArgs);
Expand Down
5 changes: 1 addition & 4 deletions testing/test_firwin.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
% This test script verifies the properties listed in the help of firwin


allwins = {'hann','tria','sine', ...
'sqrttria','itersine', 'square','hamming','blackman', ...
'nuttall','nuttall10', 'nuttall01','nuttall20','nuttall11', ...
'nuttall02','nuttall30','nuttall21','nuttall03','blackman2'};
allwins = getfield(arg_firwin,'flags','wintype');

test_failed=0;

Expand Down

0 comments on commit 958f2a8

Please sign in to comment.