Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1498
Number of posts: 2178

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
matlab complex function plot Posted by idude on 25 Sept 2012 at 11:19 AM
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
Thread Tree
idude matlab complex function plot on 25 Sept 2012 at 11:19 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.