Hi,
I have a matrix A (31 x 12) which has NaN values and need to remove all NaN values and make it a one column (:). How can I do it MATLAB?

댓글 수: 1

per isakson
per isakson 2014년 7월 4일
편집: per isakson 2014년 7월 4일
Delete one of your two nearly identical questions!

댓글을 달려면 로그인하십시오.

 채택된 답변

per isakson
per isakson 2014년 7월 4일

2 개 추천

"I have this matrix A and has NaN values. I need
  1. to remove NaN values from all the columns and
  2. write the values into one column (:)."
Step one is not possible because it would result in columns with different length.
Switching the order of the steps will return a result
A = A(:);
A( isnan( A ) ) = [];

댓글 수: 1

Damith
Damith 2014년 7월 4일
Thanks a lot. It worked. This is the result I wanted.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

질문:

2014년 7월 3일

댓글:

2014년 7월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by