+ Post New Thread
Results 1 to 7 of 7

14th March 2009, 05:38 #1
 Join Date
 Mar 2009
 Posts
 20
 Helped
 1 / 1
 Points
 832
 Level
 6
MATLAB
HOW TO PLOT COMPLEX VALUES IN MATLAB

Advertisement

14th March 2009, 18:37 #2
 Join Date
 Dec 2006
 Location
 Iraq
 Posts
 1,142
 Helped
 408 / 408
 Points
 15,648
 Level
 30
MATLAB
explain more, give an example, where you can convert to polar and plot it or others .
just give me your equation.

15th March 2009, 07:05 #3
 Join Date
 Mar 2009
 Posts
 20
 Helped
 1 / 1
 Points
 832
 Level
 6
Re: MATLAB
I want to plot the graph for exp(j*x) wrt to x

Advertisement

15th March 2009, 16:55 #4
 Join Date
 Dec 2006
 Location
 Iraq
 Posts
 1,142
 Helped
 408 / 408
 Points
 15,648
 Level
 30
Re: MATLAB
In polar Plot:
just convert your equation to polar form before any programming
x=0:pi/100:2*pi;
r=abs(exp(i*x));
the=angle(exp(i*x));
polar(the,r)
now if you want to plot it directly, the imaginary part will be ignored as below
x=0:pi/100:2*pi;
y=exp(i*x);
plot(x,y)
Warning: Imaginary parts of complex X and/or Y arguments ignored
>>
best regards

5th October 2012, 21:46 #5

Advertisement

8th October 2012, 10:47 #6
 Join Date
 Jan 2008
 Posts
 435
 Helped
 92 / 92
 Points
 3,785
 Level
 14
Re: HOW TO PLOT COMPLEX VALUES IN MATLAB ?
I think this isn't possible. You need two axis to plot x (one for the real part and one for the imaginary part  or the magnitude and the phase) and you need one axis for n1 and one for n2. Thus, you need four axis to plot, but we have only three.
You can create two 3dplots: one with the real part of x versus n1 and n2 and one with the imaginary part of x versus n1 and n2.
Or you can use the magnitude and phase instead of the real and imaginary part, this depends on your needs.

8th October 2012, 20:41 #7
Re: HOW TO PLOT COMPLEX VALUES IN MATLAB ?
oh, i see. i think it is impossible too.
   Updated   
oh, i see. i think it is impossible too.Every word or concept, clear as it may seem to be, has only a limited range of applicability.
+ Post New Thread
Please login