This shows you the differences between two versions of the page.
ps:labs_python:02 [2024/10/09 14:47] darius.necula [Semnale și sisteme de bază] |
ps:labs_python:02 [2024/10/09 15:04] (current) darius.necula [Semnale și sisteme de bază] |
||
---|---|---|---|
Line 135: | Line 135: | ||
<note important>Pentru numărul imaginar //j//, în Python se folosește notația //1j//.</note> | <note important>Pentru numărul imaginar //j//, în Python se folosește notația //1j//.</note> | ||
+ | <note tip>Folosiți codul următor pentru a desena un cerc trigonometric, peste care veți reprezenta valorile calculate mai sus | ||
+ | <code python> | ||
+ | import numpy as np | ||
+ | import matplotlib.pyplot as plt | ||
+ | |||
+ | tt = np.arange(0, 2 * np.pi, 0.1) | ||
+ | figure1 = plt.figure('Figura 1', figsize=(10, 10)) | ||
+ | complex_tt = np.exp(1j * tt) | ||
+ | x = np.real(complex_tt) | ||
+ | y = np.imag(complex_tt) | ||
+ | plt.plot(x, y, 'k.') | ||
+ | plt.plot(0, 0, 'kx') | ||
+ | </code> | ||
+ | </note> | ||
<hidden> | <hidden> | ||
=== Exerciţiul 4 [1.5p] === | === Exerciţiul 4 [1.5p] === |