I would like to work get the C values , which is firstly filled with zeros and would like to get the output from the equation I tried to insert. Yes, a has 5 index included array , which is less than other array. My data of a is true. I would like to get the result anyhow with 6 index included array c. Could you please help me out this? The error I got is
"index 5 is out of bounds for axis 0 with size 5".
import numpy as np
imax = 7
Hp = np.array([0.01, 0.01, 0.01, 0.01, 0.01, 0.01])
T = np.array([0. , 0.00023364, 0.00059821, 0.00072914, 0.00071593,
0.00035136])
c_k = np.array([ 0.8977551 , -0.12265306, -0.73489796, -0.93897959, -0.73489796,
-0.12265306])
b = np.array([0. , 0. , 0.66156463, 1.03231293, 0.99489796,
0.54931973])
a = np.array([-0. , -0.00023364, -0.00036457, -0.00036457, -0.00035136])
c = np.zeros(imax)
for i in range(1, imax):
c[i]= Hp[i]+T[i]*c_k[i]+a[i]*c_k[i+1]-b[i]