1 function [N,Nth,resampler,t]=extractparams(varargin)
\r
2 % No documentation available
\r
4 % Toolbox for nonlinear filtering.
\r
5 % Copyright (C) 2005 Jakob Rosén <jakob.rosen@gmail.com>
\r
7 % This program is free software; you can redistribute it and/or
\r
8 % modify it under the terms of the GNU General Public License
\r
9 % as published by the Free Software Foundation; either version 2
\r
10 % of the License, or (at your option) any later version.
\r
12 % This program is distributed in the hope that it will be useful,
\r
13 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 % GNU General Public License for more details.
\r
17 % You should have received a copy of the GNU General Public License
\r
18 % along with this program; if not, write to the Free Software
\r
19 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
21 % Declare the arguments
\r
27 % Fetch arguments, if they exist
\r
28 if nargin>=2; N=varargin{2}; end;
\r
29 if nargin>=3; Nth=varargin{3}; end;
\r
30 if nargin>=4; resampler=varargin{4}; end;
\r
31 if nargin>=5; t=varargin{5}; end;
\r
33 % If an empty argument, or no argument at all, was supplied - use its default value!
\r
42 if isempty(resampler)
\r
43 resampler=@rs_simple; % Resampler default
\r
51 error('Nth must be positive!');
\r
53 error('Nth must not be greater than N');
\r