I have an array of values called E representing Energy values
E = np.arange(0.1, 101, 0.1)
And I want to create a group of arrays called a0, a1, a2, a3, being those coefficients that vary depending on the value of the energy, so I want to do something similar to this:
for item in E:
if item <= 1.28:
a3, a2, a1, a0 = 0, -8.6616, 13.879, -12.104
elif 1.28<item<10:
a3, a2, a1, a0 = -0.186, 0.428, 2.831, -8.76
elif item >=10:
a3, a2, a1, a0 = 0, -0.0365, 1.206, -4.76
This code does not return any mistake, but I do not know how to create lists or arrays with the same length as the E (energy array), with every array containing the values of the coefficients fo specific energy values, so I would really appreciate your help!
Best regards!
Aucun commentaire:
Enregistrer un commentaire