removing a complex infinity

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 日

0 投票

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...

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMultidimensional Arrays についてさらに検索

質問済み:

Tom
2013 年 11 月 13 日

コメント済み:

Tom
2013 年 11 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by