Mercurial > hg > octave-nkf
comparison scripts/polynomial/deconv.m @ 1025:f558749713f1
[project @ 1995-01-11 20:52:10 by jwe]
author | jwe |
---|---|
date | Wed, 11 Jan 1995 20:52:10 +0000 |
parents | 3470f1e25a79 |
children | 611d403c7f3d |
comparison
equal
deleted
inserted
replaced
1024:56520a75b5b3 | 1025:f558749713f1 |
---|---|
1 # Copyright (C) 1995 John W. Eaton | |
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 the | |
7 # Free Software Foundation; either version 2, or (at your option) any | |
8 # later version. | |
9 # | |
10 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 # for more details. | |
14 # | |
15 # You should have received a copy of the GNU General Public License | |
16 # along with Octave; see the file COPYING. If not, write to the Free | |
17 # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
18 | |
1 function [b, r] = deconv (y, a) | 19 function [b, r] = deconv (y, a) |
2 | 20 |
21 # usage: deconv (y, a) | |
22 # | |
3 # Deconvolve two vectors. | 23 # Deconvolve two vectors. |
4 # | 24 # |
5 # [b, r] = deconv (y, a) solves for b and r such that | 25 # [b, r] = deconv (y, a) solves for b and r such that |
6 # y = conv(a,b) + r | 26 # y = conv(a,b) + r |
7 # | 27 # |
10 # polynomial of lowest order. | 30 # polynomial of lowest order. |
11 # | 31 # |
12 # SEE ALSO: conv, poly, roots, residue, polyval, polyderiv, | 32 # SEE ALSO: conv, poly, roots, residue, polyval, polyderiv, |
13 # polyinteg | 33 # polyinteg |
14 | 34 |
15 # Author: | 35 # Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. |
16 # Tony Richardson | |
17 # amr@mpl.ucsd.edu | |
18 # June 1994 | |
19 | 36 |
20 if (nargin != 2) | 37 if (nargin != 2) |
21 usage (" deconv (y,a)"); | 38 usage ("deconv (y, a)"); |
22 endif | 39 endif |
23 | 40 |
24 if (is_matrix (y) || is_matrix (a)) | 41 if (is_matrix (y) || is_matrix (a)) |
25 error("conv: both arguments must be vectors"); | 42 error("conv: both arguments must be vectors"); |
26 endif | 43 endif |