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 Exchange에서 Multidimensional 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