difraction from edge matlab code
I want to simulate diffraction from wedge with matlab using equation in balanis electromagnetic book.
but my fiqure is not look like book's figure.
my code is:
clear all clc c=5*(pi/12) q=(pi/4:pi/180:(9*pi)/4) a=pi/4 o=q-a f=100 for m=1:1:f z=j^(m/2) t=besselj(m/2,2*pi) b=sin(m/2*c) d=sin(m/2*q) x=log10(z*t*b*d) polar(o,x) hold on end
please tell me what's wrong in my code and if possible,send me code of diffraction from wedge.
How do you expect get some help without showing the reference picture ?
yes,
you are right.
I sent an image that contain book's image,book's equation and my code output.
Some parameters present on equation 11.191a are not present at the picture 11-23 ( n, Ψ ) making a little hard correlate one with other. Moreover, the code above in actual arrangement, at least for me, became a little bit hard to debug due to the temporary variables that you created to store values; their naming is not suggestive (c, d, ...). It is missing more details.
Anyway, you can find a lot of MATLAB formulations for applications on electromagnectic fields at the PDF available below, that although do not plot most results in polar coordinates, could be a good start for your code:
tanx,
I sent another image that shows the parameters name and amount in my code.
do you need more information about my code?
I can't find any matlab code in pdf that you sent me.