eine ganz dumme Frage ...
folgender Code funktioniert:
Code: Alles auswählen
#load matfile
mat = loadmat(files[0])
x=mat['Daten]
y=mat[Daten]
#x,y float32 und size(xxxx,1)
#set borders
xu = argmax(x>100)
xo = argmin(x<16000)
x=x[xu:xo,0]
y=y[xu:xo,0]
y=20*log10(y)
Anstatt eines Matfiles soll nun ein .txt als Eingangsfile verwendet werden:
Code: Alles auswählen
lines = loadtxt(files[0], skiprows = 5, delimiter="\t", unpack=False)
x=lines[:,0]
y=lines[:,1]
#x,y float64 und size(xxxx,)
#set borders
xu = argmax(x>100)
xo = argmin(x<16000)
x=x[xu:xo]
y=y[xu:xo]
y=20*log10(y)
invalid value encountered in log10
Was mache ich falsch?
VG Inco