O‘ZBEKISTON RESPUBLIKASI RAQAMLI TEXNOLOGIYALAR VAZIRLIGI
MUHAMMAD AL-XORAZMIY NOMIDAGI
TOShKENT AXBOROT TEXNOLOGIYaLARI UNIVERSITETI
“SIGNALLAR VA TIZMLAR”
fanidan
AMALIY
TOPSHIRIQ №1
Bajardi: Jumayev Elbek
Qabul qildi:Ochilov M.
Toshkent 2023
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(5, 230, 1000)
z = 5 * np.cos(x) + 2 * np.sin(x)
plt.figure(figsize=(10, 4))
plt.plot(x, z, color='b')
plt.title('z = 5cos(x) + 2sin(x)')
plt.xlabel('x')
plt.ylabel('z')
plt.grid(True)
plt.show()
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(5, 230, 1000)
diskretlash_tezligi = 52
quantization_levels = 16
x_discrete = np.linspace(5, 230, diskretlash_tezligi)
z_discrete = 5 * np.cos(x_discrete) + 2 * np.sin(x_discrete)
z_quantized = np.round(z_discrete * quantization_levels) / quantization_levels
plt.figure(figsize=(10, 4))
plt.stem(x_discrete, z_quantized, use_line_collection=True)
plt.title(f'Kvantisatsiyalangan z = 5cos(x) + 2sin(x) ({quantization_levels} daraja)')
plt.xlabel('x')
plt.ylabel('z')
plt.grid(True)
plt.show()
|