Fourier Series, complex number draw in Matlab

Thread Starter

Gablham

Joined Aug 29, 2012
4
I was self study and learning about fourier series using matlab to draw in graph

but there 1 question which I did not know how to start

the question asking me draw a complex signal on matlab

x(t) = cos (t) + j sin (t)

x(t) = a(t) + jb(t)
where a(t) and b(t) are any real signals. a(t) is the real part of the complex signal and b(t) is the imaginary part of the complex signal. If you were to draw the waveform for the complex signal x(t), then the horizontal axis will be the real part and the vertical axis will be the imaginary part.
 

Thread Starter

Gablham

Joined Aug 29, 2012
4
I put this in matlab
and I get this
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In polar at 185

is this ok???
 

blah2222

Joined May 3, 2010
582
It's a warning that it implicitly used the value 'i' as an imaginary number. If you don't want the warning use:

Rich (BB code):
i = sqrt(-1);
t = 0:0.1:2*pi;
f = cos(t) + i*sin(t);
plot(real(f), imag(f));
 

Thread Starter

Gablham

Joined Aug 29, 2012
4
yes, the warning disappear, thank you for that
but, for knowledge, what circumstances will this warning appear???
and what is this warning really mean???
I try to understand from google, some say it doesn't matter and just ignore it
but I don't really agree
so I wish to know more about this so that in future when diffrent equation/question I can handle it when it appear again

and thanks again, really appreciated
 

HonT

Joined Oct 25, 2012
14
yes, the warning disappear, thank you for that
but, for knowledge, what circumstances will this warning appear???
and what is this warning really mean???
I try to understand from google, some say it doesn't matter and just ignore it
but I don't really agree
so I wish to know more about this so that in future when diffrent equation/question I can handle it when it appear again

and thanks again, really appreciated

Please refer to

http://www.mathworks.com/support/solutions/en/data/1-FA99WK/index.html?solution=1-FA99WK
 
Top