Hi, I have
a=[1;2;3]and b=[23;nan;4]
how I can get these
c=[2] and also D=[1,23;3,4]
Thanks a lot

 채택된 답변

Walter Roberson
Walter Roberson 2015년 8월 30일

1 개 추천

idx = isnan(b);
c = a(idx);
D = [a(~idx), b(~idx)];

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

질문:

2015년 8월 30일

댓글:

2015년 8월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by