フィルターのクリア

How to implement the math equation correctly to make a plot ?

1 回表示 (過去 30 日間)
Vahram Voskerchyan
Vahram Voskerchyan 2021 年 6 月 22 日
回答済み: Walter Roberson 2021 年 6 月 22 日
I have a equation for irradiance distribution that says.
it's an radiance distribution where the k is the wave vector , Λ is the period between the emitting elements. Implementing the equaiton can give the plot showing below. I am struggling to implement this equation when I plug everything in all I get is a single value. How do I loop this equation and create a matrix so it can give me the plot that is shown below ?
%rectangular aperture array factor.
I_0 = 1;
lambda =1.55e-6;
k=(2*pi)/lambda;
period = 2e-6;
theta = 20;
numel=33;
I = I_0*abs(((sind(k*period*sind(theta))/k*period*sind(theta))*(sind(numel/2*k*sind(theta))/sind(0.5*k*period*sind(theta)))))
For now I am trying to implement the equation to have the plot like below. But this will only give a signle value. How can I implement the right equation to have the plot shown above.

採用された回答

Walter Roberson
Walter Roberson 2021 年 6 月 22 日
%rectangular aperture array factor.
N = 150;
I_0 = 1;
lambda =1.55e-6;
k=(2*pi)/lambda;
period = 2e-6;
theta = linspace(-25,25,N);
numel=33;
I = I_0 .* abs(((sind(k .* period .* sind(theta)) ./ k .* period .* sind(theta)) .* (sind(numel ./ 2 .* k .* sind(theta)) ./ sind(0.5 .* k .* period .* sind(theta)))));
plot(theta, I)
As you increase N, you will get a denser and denser plot that is more and more unreadable. That is because you are plotting a high frequency signal.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by