removing a complex infinity

2 次查看(过去 30 天)
Tom
Tom 2013-11-13
评论: Tom 2013-11-13
If I have elements in a matrix which are 0 + Infi, what is the best way to delete these elements?
I have tried
x(x==0+infi) = [];
but this doesn't seem to work.
kind regards,
Tom

回答(1 个)

Andrei Bobrov
Andrei Bobrov 2013-11-13
x(real(x)==0&isinf(imag(x))) = [];
  1 个评论
Tom
Tom 2013-11-13
Thanks, but this seems to be deleting every element in the matrix...

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by