<pre><code>f=np.loadtxt('Single Small Angle 1.txt',unpack=True,skiprows=2)
g=np.loadtxt('Single Small Angle 5.txt',unpack=True,skiprows=2)
x = f-g[:,:11944]
t=range(len(x))
m=math.log10(abs(x))
np.polyfit(t,m)
plt.plot(t,abs(x))
plt.show()
</code></pre>
<p>我只是不知道如何解决我的问题。它一直在说:</p>
<pre><code>m=math.log10(abs(x))
TypeError: only length-1 arrays can be converted to Python scalars
</code></pre>