drawing complex equation in 2D

2 vues (au cours des 30 derniers jours)
Firas Kareem
Firas Kareem le 25 Oct 2020
Dear Folks ,
kindly I need your help to plot the following equation :
P=151920000/w -(2673792000*w^2*cos(w) + w*sin(w)*44299872000i - 80736516720000*cos(w))/(w*(4*w - 729)*(4*w + 729)) + (243072000*w*exp((729i)/4))/((4*w - 729)*(4*w + 729))
w=1e06:100e06:1e09
appreciate your cooperation .

Réponses (1)

Cris LaPierre
Cris LaPierre le 26 Oct 2020
You've already done all the hard work. Just define w first, and then use elementwise multiplication and division. You can use abs to plot the magnitude of P since it contains imaginary numbers. You could also use real() or imag() to plot the real or imaginary part, respectively.
If you are just getting started with MATLAB, I suggest going through MATLAB Onramp. It will introduce you to the MATLAB environment as well as the fundamentals of programming in MATLAB. Once you complete it, you'll be able to do this an much more on your own.
w=1e06:100e06:1e09;
P=151920000./w -(2673792000*w.^2.*cos(w) + w.*sin(w)*44299872000i - 80736516720000*cos(w))./(w.*(4*w - 729).*(4*w + 729)) + (243072000*w*exp((729i)/4))./((4*w - 729).*(4*w + 729));
plot(w,abs(P))

Catégories

En savoir plus sur Line 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