Please, how to plot for this code?

1 vue (au cours des 30 derniers jours)
soe min aung
soe min aung le 25 Jan 2021
Réponse apportée : KSSV le 25 Jan 2021
k = -2:0.1:2;
g = ((2*cos(2*k))-2)/(1i*k);
plot(k,g)

Réponse acceptée

KSSV
KSSV le 25 Jan 2021
Read about element by element operations.
k = -2:0.1:2;
g = ((2*cos(2*k))-2)./(1i*k); % use ./
plot(k,abs(g))
hold on
plot(k,real(g))
plot(k,imag(g))
legend('abs','real','imaginary')

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by