1
我想一起扔了一大堆,但顯然這不是我的代碼有問題,但。我不知道它的代碼它響了線談論它是一個的給我一個錯誤,最後一行我得到一個「類型錯誤:‘詮釋’對象有沒有屬性‘_getitem’,我不知道爲什麼
import numpy as np
import matplotlib.pyplot as plt
phi = np.zeros(181)
for i in range(0,181):
phi[i] = i-90.
hF = np.zeros((181,321))
hM = np.zeros((181,321))
Ob = 23.5*3.131592/180
w = np.zeros(321)
e = 0.6
for j in range(0,321):
w[j] = 2*np.pi*j/320
SF = 3230.3
SM = np.zeros(321)
L = 283
decF = np.zeros(321)
for j in range(0,321):
decF[j] = Ob*np.sin(w[j])
dF = np.zeros(321)
dM = np.zeros(321)
QF = np.zeros((181,321))
for j in range(0,321):
dF[j] = (1+e*np.cos(w[j]-L*np.pi/320))/(1-e**2)
for i in range(0,181):
for j in range(0,321):
QF = 0
if np.abs(np.tan(phi[i]*np.pi/180)*np.tan(decF[j])) <=1:
hF[i][j] = np.acos(-np.tan(phi[i]*np.pi/180)*np.tan(decF[j]))
QF[i][j] = (SF/np.pi)*dF[j]*(hF[i][j]*np.sin(phi[i]*np.pi/180)*np.sin(decF[j])+np.cos(phi[i]*np.pi/180)*np.cos(decF[i])*sin(hF[i][j]))