1. Plot the amplitude of the complex function G(x,w)=xexp(-lR)/R^2, l=iw/c, R=sqrt(x^2+y^2+z^2), for -100<x<100 with 200 points, for -90<y<90 with 180 points, for z=100, w=1000, c=1500. Use the meshgrid option to be able to compute G and plot the result using ' imagesc'. annotate the axes
2. Plot the phase of G(x,w) as a function of x and y. Use ‘lookfor phase angle’ to find out how to compute the phase of complex numbers.
here is my approach to question 1
x=linspace(-100,100,200);
y=linspace(-90,90,180);
z=100;
w=1000;
c=1500;
[X,Y,Z]=meshgrid(x,y,z);
R=sqrt(X.^2+Y.^2+Z.^2);
G=X.*exp(-1i*w/c*R)./R.^2
figure, imagesc(x,y,real(G))
xlabel('X-axis'), ylabel('Y-axis')
could you advise me please