c 値の範囲をループしたいですか? それ、どうやったら出来るの?外側に for ループまたは while ループを置いてみました:
注: 値が 120 の 4 から 15 の間の c が必要です
for c in range(4,15):
i=0
while i< nt-1: #if i<nt-1 is true, the body below will be excuted
#Update the acceleration using the following equation
x[i+1] = (-y[i]-z[i])*deltat+x[i]
#Update the velocity using the follwing equation
y[i+1] =(x[i]+a*y[i])*deltat+y[i]
#Update the displacement, using follwing equation
z[i+1] = (b+z[i]*(x[i]-c))*deltat+z[i]
#go to next time step
i=i+1
また
c=arange(4,15,1)
for p in c:
while i< nt-1: #if i<nt-1 is true, the body below will be excuted
#Update the acceleration using the following equation
x[i+1] = (-y[i]-z[i])*deltat+x[i]
#Update the velocity using the follwing equation
y[i+1] =(x[i]+a*y[i])*deltat+y[i]
#Update the displacement, using follwing equation
z[i+1] = (b+z[i]*(x[i]-p))*deltat+z[i]
#go to next time step
i=i+1