STATLAB/ListaFunkcji: Różnice pomiędzy wersjami
Z Brain-wiki
Linia 30: | Linia 30: | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.round.html numpy.round] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.round.html numpy.round] | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html numpy.absolute] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.absolute.html numpy.absolute] | ||
− | | | + | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.iinfo.html numpy.iinfo] |
|} | |} | ||
Linia 75: | Linia 75: | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.kaiser.html numpy.kaiser] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.kaiser.html numpy.kaiser] | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html numpy.fft.rfft] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfft.html numpy.fft.rfft] | ||
+ | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.rfftfreq.html numpy.fft.rfftfreq] | ||
+ | |[http://scipy.github.io/devdocs/generated/scipy.signal.periodogram.html scipy.signal.periodogram] | ||
+ | |- | ||
+ | |[http://scipy.github.io/devdocs/generated/scipy.signal.welch.html scipy.signal.welch] | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html numpy.correlate] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html numpy.correlate] | ||
|[http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.convolve.html scipy.signal.convolve] | |[http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.convolve.html scipy.signal.convolve] | ||
− | |||
− | |||
− | |||
− | |||
| | | | ||
|} | |} | ||
Linia 126: | Linia 126: | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html numpy.loadtxt] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html numpy.loadtxt] | ||
|[http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html numpy.savetxt] | |[http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html numpy.savetxt] | ||
+ | |- | ||
+ | |[http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.read.html scipy.io.wavfile.read] | ||
+ | |[http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.write.html scipy.io.wavfile.write] | ||
+ | | | ||
+ | | | ||
|} | |} | ||
Wersja z 21:34, 5 lis 2015
Spis treści
Biblioteki
Lista funkcji
Matematyczne z pakietu numpy
numpy.sin | numpy.exp | numpy.log | numpy.real |
numpy.imag | numpy.conj | numpy.unwrap | numpy.angle |
numpy.sqrt | numpy.sum | numpy.power | numpy.ceil |
numpy.floor | numpy.round | numpy.absolute | numpy.iinfo |
Macierzowe z pakietu numpy
Sygnałowe
Statystyczne
numpy.mean | numpy.std | scipy.stats.scoreatpercentile | scipy.stats.norm |
numpy.random.rand | numpy.random.randn |
Filtry
Pliki
numpy.fromfile | numpy.ndarray.tofile | numpy.loadtxt | numpy.savetxt |
scipy.io.wavfile.read | scipy.io.wavfile.write |
Wykresy Matplotlib
http://matplotlib.org/api/pyplot_api.html
plot | stem | subplot | figure |
imshow | title | xlim | ylim |
xlab | ylab | label | legend |
grid | show | fill_between | step |
Dodatkowe
import pylab as py
import numpy as np
def sin(f = 1, T = 1, Fs = 128, phi =0 ):
'''sin o zadanej częstości (w Hz), długości, fazie i częstości próbkowania
Domyślnie wytwarzany jest sygnał reprezentujący
1 sekundę sinusa o częstości 1 Hz i zerowej fazie próbkowanego 128 Hz
'''
dt = 1.0/Fs
t = np.arange(0,T,dt)
s = np.sin(2*np.pi*f*t + phi)
return (s,t)
import numpy as np
from numpy.fft import fft, fftfreq, fftshift
def widmo_dB(s, N_fft, F_samp):
S = fft(s,N_fft)/np.sqrt(N_fft)
S_dB = 20*np.log10(np.abs(S))
F = fftfreq(N_fft, 1.0/F_samp)
return (fftshift(S_dB),fftshift(F))