Fourier Series, complex number draw in Matlab

Discussion in 'Homework Help' started by Gablham, Oct 22, 2012.

  1. Gablham

    Thread Starter New Member

    Aug 29, 2012
    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.
  2. Gablham

    Thread Starter New Member

    Aug 29, 2012
    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???
  3. blah2222

    Distinguished Member

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

    Code ( (Unknown Language)):
    2. i = sqrt(-1);
    3. t = 0:0.1:2*pi;
    4. f = cos(t) + i*sin(t);
    5. plot(real(f), imag(f));
  4. Gablham

    Thread Starter New Member

    Aug 29, 2012
    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
  5. HonT

    New Member

    Oct 25, 2012

    Please refer to