Warning: Using only the real component of complex data.

30 vues (au cours des 30 derniers jours)
Pablo Álvarez García
Pablo Álvarez García le 11 Fév 2022
Modifié(e) : Yongjian Feng le 11 Fév 2022
%¿por que me da este warning?
n=0:5:50;
x= exp(j*pi*n);
stem(x)

Réponse acceptée

Yongjian Feng
Yongjian Feng le 11 Fév 2022
Modifié(e) : Yongjian Feng le 11 Fév 2022
j is the imaginary unit here, so x is complex. stem is not used to plot complex numbers, that is why only the real component is used.
Maybe you want to plot the real part and/or the imaginary part?
stem(real(x))
stem(imag(x))

Plus de réponses (0)

Catégories

En savoir plus sur Just for fun dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by