How to solve: Imaginary parts of complex X and/or Y arguments ignored

Hi. I have a data like this:
if true
Data = [500.000000000000 0.029967310000 -0.001687050000
522.500000000000 0.027351380000 -0.003009796000
545.000000000000 0.025257110000 -0.003014565000
567.500000000000 0.022685050000 -0.003929138000
590.000000000000 0.019535060000 -0.003846169000
];
X = Data(1,:);
Y = Data(2,:)+1i*Data(3,:);
plot(X,Y)
% code
end
When I run this code I get this Warning:
"Warning: Imaginary parts of complex X and/or Y arguments ignored"
How can I solve that?
NOTE: Y defines variations of a complex parameter in a frequency range. If I wanted to see variation of real part of it in the frequency range, simply I would plot(X,Data(2,:)). Similarly If I wanted to see variation of imaginary part of Y in the frequency range, simply I would plot(X,Data(3,:)).
Y has two variables, Real and imaginary parts. how can I behave Y as a one variable parameter to use 2 dimensional plot command?
Is that possible?

Answers (1)

How can you plot an imaginary array y? you have to choose what you want to plot, the imaginary part or the real part, or the modulus
X = Data(1,:);
Y = Data(2,:)+1i*Data(3,:);
plot(X,abs(Y))

6 Comments

I need to plot both real part and imaginary part of Y not abs or just real part.
Y defines variations of a complex parameter in a frequency range. If I wanted to see variation of real part of it in the frequency range, simply I would plot(X,Data(2,:)). Similarly If I wanted to see variation of imaginary part of Y in the frequency range, simply I would plot(X,Data(3,:)).
Y has two variables, Real and imaginary parts. how can I behave Y as a one variable parameter to use 2 dimensional plot command?
Is that possible?
Y represent two values (real part and imaginary part). Two represent a complex signal there are many representations, Bode, Black Nyquist. You can't represent the two parts as one parameters.

Sign in to comment.

Categories

Tags

Asked:

on 8 Oct 2014

Commented:

on 8 Oct 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!