3
有沒有一種方法來實現這個向量化?向量化Numpy循環
waveheight=zeros(10000)
for t in range(10000):
for j in range(N_frequencysteps):
waveheight[t] = waveheight[t] + (Abs_S_newwave[j] * cos (K[j] * x - (omega[j] * ((t*0.01) - TimeShift)) + TSi_omega[j] + arg_S_newwave[j]))