Mercurial > octave-antonio
annotate scripts/signal/filter2.m @ 14359:7277fe922e99
doc: Use Octave preference for double quote in docstrings in scripts/
* interp1.m, interp2.m, interp3.m, interpn.m, profexplore.m, profile.m,
profshow.m, quadgk.m, lookfor.m, imagesc.m, bzip2.m, gzip.m, parseparams.m,
pkg.m, ancestor.m, caxis.m, ezmesh.m, ezmeshc.m, ezsurf.m, ezsurfc.m, hidden.m,
hold.m, patch.m, pie.m, pie3.m, quiver.m, quiver3.m, scatter3.m,
uicontextmenu.m, uicontrol.m, uipanel.m, uipushtool.m, uitoggletool.m,
uitoolbar.m, xlim.m, ylim.m, zlim.m, ismember.m, setxor.m, filter2.m, bicg.m,
demo.m, example.m, fail.m, test.m: Use Octave preference for double quote in
docstrings in scripts/ directory.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 13 Feb 2012 07:38:23 -0800 |
parents | 72c96de7a403 |
children | 5d3a684236b0 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
1 ## Copyright (C) 2001-2012 Paul Kienzle |
5820 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
5820 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
5820 | 18 |
5996 | 19 ## -*- texinfo -*- |
10793
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
9245
diff
changeset
|
20 ## @deftypefn {Function File} {@var{y} =} filter2 (@var{b}, @var{x}) |
6549 | 21 ## @deftypefnx {Function File} {@var{y} =} filter2 (@var{b}, @var{x}, @var{shape}) |
9051
1bf0ce0930be
Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents:
7017
diff
changeset
|
22 ## Apply the 2-D FIR filter @var{b} to @var{x}. If the argument |
5820 | 23 ## @var{shape} is specified, return an array of the desired shape. |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
24 ## Possible values are: |
5820 | 25 ## |
26 ## @table @asis | |
14359
7277fe922e99
doc: Use Octave preference for double quote in docstrings in scripts/
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
27 ## @item "full" |
5820 | 28 ## pad @var{x} with zeros on all sides before filtering. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
29 ## |
14359
7277fe922e99
doc: Use Octave preference for double quote in docstrings in scripts/
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
30 ## @item "same" |
5820 | 31 ## unpadded @var{x} (default) |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
32 ## |
14359
7277fe922e99
doc: Use Octave preference for double quote in docstrings in scripts/
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
33 ## @item "valid" |
5820 | 34 ## trim @var{x} after filtering so edge effects are no included. |
35 ## @end table | |
36 ## | |
37 ## Note this is just a variation on convolution, with the parameters | |
38 ## reversed and @var{b} rotated 180 degrees. | |
39 ## @seealso{conv2} | |
5996 | 40 ## @end deftypefn |
5820 | 41 |
42 ## Author: Paul Kienzle <pkienzle@users.sf.net> | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
43 ## 2001-02-08 |
5820 | 44 ## * initial release |
45 | |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10821
diff
changeset
|
46 function y = filter2 (b, x, shape) |
5820 | 47 |
48 if (nargin < 2 || nargin > 3) | |
6046 | 49 print_usage (); |
5820 | 50 endif |
51 if (nargin < 3) | |
52 shape = "same"; | |
53 endif | |
54 | |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10821
diff
changeset
|
55 [nr, nc] = size(b); |
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10821
diff
changeset
|
56 y = conv2 (x, b(nr:-1:1, nc:-1:1), shape); |
5820 | 57 endfunction |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10821
diff
changeset
|
58 |