我写了Henon迭代代码

时间:2016-12-07 01:07:04

标签: python-2.7 iteration

def HenonIterate_Plot(x0,y0,a,b,alpha,gamma,n):

    iterates = np.zeros([n,2])  # This makes an nx2 matrix i.e n rows, 2 columns, where the first column stores x coordinates,
                                # and the 2nd column stores y coordinates
    iterates[0,0] = x0 # Store the initial x-coordinate
    iterates[0,1] = y0 # Store the initial y-coordinate
    for jj in range(1,n):
        iterates[1:] = HenonMap(iterates[n:],1)

    return iterates

0 个答案:

没有答案