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

Antworten (1)

Andrei Bobrov
Andrei Bobrov am 13 Nov. 2013

0 Stimmen

x(real(x)==0&isinf(imag(x))) = [];

1 Kommentar

Tom
Tom am 13 Nov. 2013
Thanks, but this seems to be deleting every element in the matrix...

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

Tom
am 13 Nov. 2013

Kommentiert:

Tom
am 13 Nov. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by