Plot the power function P(x)=sinc^2(x)(mW) from -5πx5π
19 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Walter Roberson
2018-2-6
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 个评论
Walter Roberson
2018-2-6
I wonder if you were trying to indicate
P = sinc(x).^2 .' * mW;
plot(x, P)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!