comparison scripts/polynomial/polyout.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents f6e0404421f4
children a8ce6bdecce5
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
60 n1 = n+1; 60 n1 = n+1;
61 61
62 tmp = coeff (c(1)); 62 tmp = coeff (c(1));
63 for ii = 2:n 63 for ii = 2:n
64 if (real (c(ii)) < 0) 64 if (real (c(ii)) < 0)
65 ns = " - "; 65 ns = " - ";
66 c(ii) = -c(ii); 66 c(ii) = -c(ii);
67 else 67 else
68 ns = " + "; 68 ns = " + ";
69 endif 69 endif
70 70
71 tmp = sprintf ("%s*%s^%d%s%s", tmp, x, n1-ii, ns, coeff (c(ii))); 71 tmp = sprintf ("%s*%s^%d%s%s", tmp, x, n1-ii, ns, coeff (c(ii)));