Muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalari universiteti amaliy ish




Download 0,55 Mb.
Sana22.05.2024
Hajmi0,55 Mb.
#250162
Bog'liq
3- Amaliy 20-var




MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI

Amaliy ish

Topshirdi: ___-21guruh talabasi


______________________________
Qabul qildi: _________________

Toshkent 2024

20.

z=2cos(x/π)+sin(x)

Deskret Fure,
Deskret Cosinus

x (0; πN/2),

# ** DTC bo`yicha o`zgartirish**

from scipy.fft import dct


from scipy.fft import idct
import numpy as np
import matplotlib.pyplot as plt
N=20
D = dct(np.eye(N), axis=0, norm='ortho')
D1 = dct(np.eye(N), axis=0, norm='ortho')
print(D)

x = np.arange(0, N, 1)


y1 = 2*np.cos((x)/(np.pi)) + np.sin(x)


y = np.array(y1)

F=np.dot(y,D)


print(F)

fig, axs = plt.subplots(2)


axs[0].plot(y1, 'tab:orange')
axs[1].stem(F, 'tab:green')

F1 = [ 2.14163975, 3.46469804, 0, -2.25161152, 0, 0, 0, 0]


t=D.transpose()
y0 = np.dot(F,t)
print(y)
print(y0)
fig, axs = plt.subplots(2)
axs[0].plot(y1, 'tab:orange')
axs[1].plot(y0, 'tab:green')




#Fure
import numpy as np
import matplotlib.pyplot as plt
N = 20
f = np.array( np.fft.fft(np.eye(N)))
f1 = np.array( np.fft.ifft(np.eye(N)))

x = np.arange(0, N, 1)


y1 = 2*np.cos((x)/(np.pi)) + np.sin(x)


y = np.array(y1)


F=np.dot(y,f)


print(F)

fig, axs = plt.subplots(2)


axs[0].plot(y1, 'tab:orange')


axs[1].stem(F, 'tab:green')

F1= [ 3.76779793+0.j, 5.34182634-6.85753823j, 0+0.j, 0+0.j, 0+0.j, 0-0.j, 0-0.j, 5.34182634+6.85753823j]


ff =f.transpose()
y0 = np.dot(F,f1)
print(y)
print(y0)
fig, axs = plt.subplots(2)
axs[0].plot(y1, 'tab:orange')
axs[1].plot(y0, 'tab:green')




Download 0,55 Mb.




Download 0,55 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalari universiteti amaliy ish

Download 0,55 Mb.