How to implement the math equation correctly to make a plot ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Vahram Voskerchyan
il 22 Giu 2021
Risposto: Walter Roberson
il 22 Giu 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 Commenti
Risposta accettata
Walter Roberson
il 22 Giu 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!