how can I plot diffracted filed in polar coordinate?

hi, I want to plot the diffracted field by a PEC wedge. I posted the equation and the main plot and my code's figure in an Image. and this is my matlab code,but I receive this error:
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In polar (line 192)
In wedgemodal11balanis (line 28)
my code:
clc
clear all
a=pi/4
q=(pi/4:0.01:7*(pi/4))
c=5*pi/12
d=1
f=3*(10^10)
y=(3*(10^8))/f
p=y
w=2*pi*f
miu=1
b=(2*pi)/y
o=q-a
u=c-a
e0=(sqrt((pi*1j/(2*b))))*((w*miu)/(pi-a))*((exp(-1j*b*d))/sqrt(d))
inf=10
for m=1:inf
e1=1j^(m/2)
e2=besselj(m/2,b*p)
e3=sin((m/2)*c)
e4=sin((m/2)*q)
et=(10*log10(e0*e1*e2*e3*e4))
polar(o,et)
end

 Accepted Answer

Perhaps you want to plot the amplitude of the field? If so just change
et=(10*log10(e0*e1*e2*e3*e4))
to ab_et=(10*log10(abs(e0*e1*e2*e3*e4)));
HTH

1 Comment

thanks,yes,I want to plot the amplitude. I changed it,but nothing happened.new figure and old figure are same. I think I have a problem in plotting figure. I don't know where is the problem.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!