Mercurial > octave
comparison examples/code/@FIRfilter/FIRfilter_aggregation.m @ 21070:fd97ed44f2da
doc: Use more coding conventions in Object Oriented reference example code.
* examples/code/@FIRfilter/FIRfilter.m,
examples/code/@FIRfilter/FIRfilter_aggregation.m,
examples/code/@FIRfilter/subsasgn.m, examples/code/@FIRfilter/subsref.m,
examples/code/@polynomial/display.m, examples/code/@polynomial/double.m,
examples/code/@polynomial/get.m, examples/code/@polynomial/mtimes.m,
examples/code/@polynomial/numel.m, examples/code/@polynomial/polynomial.m,
examples/code/@polynomial/polynomial_superiorto.m,
examples/code/@polynomial/polyval.m, examples/code/@polynomial/roots.m,
examples/code/@polynomial/set.m, examples/code/@polynomial/subsasgn.m,
examples/code/@polynomial/subsref.m:
Remove "Function File" from deftypefn. Use names of variables in error
messages. Surround invalid items in error messages with single quotes.
Use meaningful variable names.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 14 Jan 2016 09:59:07 -0800 |
parents | 73ab962bc52d |
children | 28de41192f3c |
comparison
equal
deleted
inserted
replaced
21069:a1aadf619e3c | 21070:fd97ed44f2da |
---|---|
1 ## -*- texinfo -*- | 1 ## -*- texinfo -*- |
2 ## @deftypefn {Function File} {} FIRfilter () | 2 ## @deftypefn {} {} FIRfilter () |
3 ## @deftypefnx {Function File} {} FIRfilter (@var{p}) | 3 ## @deftypefnx {} {} FIRfilter (@var{p}) |
4 ## Create a FIR filter with polynomial @var{p} as coefficient vector. | 4 ## Create a FIR filter with polynomial @var{p} as coefficient vector. |
5 ## @end deftypefn | 5 ## @end deftypefn |
6 | 6 |
7 function f = FIRfilter (p) | 7 function f = FIRfilter (p) |
8 | 8 |
12 | 12 |
13 if (nargin == 0) | 13 if (nargin == 0) |
14 f.polynomial = @polynomial ([1]); | 14 f.polynomial = @polynomial ([1]); |
15 else | 15 else |
16 if (! isa (p, "polynomial")) | 16 if (! isa (p, "polynomial")) |
17 error ("FIRfilter: expecting polynomial as input argument"); | 17 error ("@FIRfilter: P must be a polynomial object"); |
18 endif | 18 endif |
19 | 19 |
20 f.polynomial = p; | 20 f.polynomial = p; |
21 endif | 21 endif |
22 | 22 |