comparison scripts/polynomial/polyreduce.m @ 2311:2b5788792cad

[project @ 1996-07-11 20:18:38 by jwe]
author jwe
date Thu, 11 Jul 1996 20:18:38 +0000
parents 5cffc4b8de57
children 204cc7db6f4a
comparison
equal deleted inserted replaced
2310:e2a8f216373d 2311:2b5788792cad
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, write to the Free 16 ### along with Octave; see the file COPYING. If not, write to the Free
17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
18 ### 02111-1307, USA. 18 ### 02111-1307, USA.
19 19
20 ## usage: polyreduce(c)
21 ##
22 ## Reduces a polynomial coefficient vector to a minimum number of terms,
23 ## i.e. it strips off any leading zeros.
24 ##
25 ## SEE ALSO: poly, roots, conv, deconv, residue, filter, polyval, polyvalm,
26 ## polyderiv, polyinteg
27
20 function p = polyreduce (p) 28 function p = polyreduce (p)
21
22 ## usage: polyreduce(c)
23 ##
24 ## Reduces a polynomial coefficient vector to a minimum number of terms,
25 ## i.e. it strips off any leading zeros.
26 ##
27 ## SEE ALSO: poly, roots, conv, deconv, residue, filter, polyval, polyvalm,
28 ## polyderiv, polyinteg
29 29
30 ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. 30 ## Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994.
31 31
32 index = find (p == 0); 32 index = find (p == 0);
33 33