How to implement the math equation correctly to make a plot ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Vahram Voskerchyan
le 22 Juin 2021
Réponse apportée : Walter Roberson
le 22 Juin 2021
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.
2 commentaires
Réponse acceptée
Walter Roberson
le 22 Juin 2021
%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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!