Remove NaN and create one column
    조회 수: 1 (최근 30일)
  
       이전 댓글 표시
    
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
      
      
 2014년 7월 4일
				
      편집: per isakson
      
      
 2014년 7월 4일
  
			Delete one of your two nearly identical questions!
채택된 답변
  per isakson
      
      
 2014년 7월 4일
        "I have this matrix A and has NaN values. I need
- to remove NaN values from all the columns and
- 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 ) ) = [];
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

