Mercurial > hg > octave-lyh
comparison scripts/polynomial/polygcd.m @ 10821:693e22af08ae
Grammarcheck documentation of m-files
Add newlines between @item fields for readability.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 26 Jul 2010 21:25:36 -0700 |
parents | 95c3e38098bf |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
10820:c44c786f87ba | 10821:693e22af08ae |
---|---|
15 ## You should have received a copy of the GNU General Public License | 15 ## You should have received a copy of the GNU General Public License |
16 ## along with Octave; see the file COPYING. If not, see | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {@var{q} =} polygcd (@var{b}, @var{a}, @var{tol}) | 20 ## @deftypefn {Function File} {@var{q} =} polygcd (@var{b}, @var{a}) |
21 ## @deftypefnx {Function File} {@var{q} =} polygcd (@var{b}, @var{a}, @var{tol}) | |
21 ## | 22 ## |
22 ## Find greatest common divisor of two polynomials. This is equivalent | 23 ## Find the greatest common divisor of two polynomials. This is equivalent |
23 ## to the polynomial found by multiplying together all the common roots. | 24 ## to the polynomial found by multiplying together all the common roots. |
24 ## Together with deconv, you can reduce a ratio of two polynomials. | 25 ## Together with deconv, you can reduce a ratio of two polynomials. |
25 ## Tolerance defaults to | 26 ## Tolerance defaults to @code{sqrt(eps)}. |
26 ## @example | |
27 ## sqrt(eps). | |
28 ## @end example | |
29 ## Note that this is an unstable | |
30 ## algorithm, so don't try it on large polynomials. | |
31 ## | 27 ## |
32 ## Example | 28 ## Note that this is a numerically unstable algorithm, and should not be used |
29 ## on large polynomials. | |
30 ## | |
31 ## Example: | |
32 ## | |
33 ## @example | 33 ## @example |
34 ## @group | 34 ## @group |
35 ## polygcd (poly(1:8), poly(3:12)) - poly(3:8) | 35 ## polygcd (poly(1:8), poly(3:12)) - poly(3:8) |
36 ## @result{} [ 0, 0, 0, 0, 0, 0, 0 ] | 36 ## @result{} [ 0, 0, 0, 0, 0, 0, 0 ] |
37 ## deconv (poly(1:8), polygcd (poly(1:8), poly(3:12))) ... | 37 ## deconv (poly(1:8), polygcd (poly(1:8), poly(3:12))) ... |