can you remove complex values from a plot

15 次查看(过去 30 天)
I am using plotyy but I have noticed that it begins to try and plot complex values. I know the data is accurate up until the numbers become complex. Is there a way to tell matlab to not plot the complex values.
Edit
I am plotting 2 [3x99] matrices. In one matrix the values will become complex after a point while the other matrix will always be real. I am looking for a way to ignore the complex values.

采纳的回答

Sean de Wolski
Sean de Wolski 2014-10-24
编辑:Sean de Wolski 2014-10-24
xreal = real(x)
More
x = [3+0i,5+1i,4+2i,1+0i]
x(~imag(x))
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Two y-axis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by