Effacer les filtres
Effacer les filtres

Plot the power function P(x)=sinc^2(x)(mW) from -5πx5π

10 vues (au cours des 30 derniers jours)
Brooks Nelson
Brooks Nelson le 6 Fév 2018
Commenté : Walter Roberson le 6 Fév 2018
I am using the following.
x=-5*pi:pi/100:5*pi;
mW=0:.02:1;
P= sinc^2*(x)*(mW); <--- I get an error hear
I am supposed to ignore the divide by zero warning.
Plotting the power in mW from 0 to 1mW.
Plotting the power in dBm from -30 to 0dBm.

Réponses (1)

Walter Roberson
Walter Roberson le 6 Fév 2018
sinc = randn(); %you did not define it
P = sinc^2*(x.')*(mW);
plot(x, P)
Somehow I doubt you will be pleased with the output.
  1 commentaire
Walter Roberson
Walter Roberson le 6 Fév 2018
I wonder if you were trying to indicate
P = sinc(x).^2 .' * mW;
plot(x, P)

Connectez-vous pour commenter.

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