comparison scripts/polynomial/polyreduce.m @ 1178:bceff7ccdb79

[project @ 1995-03-23 21:42:24 by jwe]
author jwe
date Thu, 23 Mar 1995 21:42:24 +0000
parents f558749713f1
children f070efd56c3d
comparison
equal deleted inserted replaced
1177:da83c9182359 1178:bceff7ccdb79
28 28
29 # Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994. 29 # Written by Tony Richardson (amr@mpl.ucsd.edu) June 1994.
30 30
31 index = find (p == 0); 31 index = find (p == 0);
32 32
33 index = find (index == 1:length(index)); 33 if (length (index) != 0)
34 34
35 if (length (index) == 0) 35 index = find (index == 1:length(index));
36 return;
37 endif
38 36
39 if(length(p)>1) 37 if (length (index) != 0)
40 p = p (index (length (index))+1:length(p));
41 endif
42 38
43 if (length (p) == 0) 39 if (length (p) > 1)
44 p = 0; 40 p = p (index (length (index))+1:length (p));
41 endif
42
43 if (length (p) == 0)
44 p = 0;
45 endif
46
47 endif
48
45 endif 49 endif
46 50
47 endfunction 51 endfunction