removing a complex infinity

1 view (last 30 days)
Tom
Tom on 13 Nov 2013
Commented: Tom on 13 Nov 2013
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

Answers (1)

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

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!