(08/26/2009, 09:55 PM)jaydfox Wrote: Well, the Carleman matrix consists of rows that are powers of the Taylor series in question (iterated multiplication, not iterated composition).
The matrix application seems a bit obfuscated to me. Is there any reason why you dont do:
Code:
def psmul(A,B):
N = len(B)
return [sum([A[k]*B[n-k] for k in xrange(n+1)]) for n in xrange(N)]
C = Matrix(R,N)
row = vector(R,[1]+(N-1)*[0])
C[0] = row
for m in xrange(1,N):
row = psmul(row,coeffs)
C[m] = rowBtw. the code is now fast. Thanks Jay.
