I have a matrix which looks like A = [1 NaN 1 ; NaN 1 2; NaN 1 2]; How can I remove all NaN's from the A matrix?
조회 수: 2 (최근 30일)
이전 댓글 표시
A = [1 NaN 1 ; NaN 1 2; NaN 1 2];
댓글 수: 0
채택된 답변
madhan ravi
2018년 11월 7일
편집: madhan ravi
2018년 11월 7일
A = [1 NaN 1 ; NaN 1 2; NaN 1 2];
A(isnan(A))=[] ;
A = reshape(A,3,2)
command window:
>> COMMUNITY
A =
1 1
1 2
1 2
>>
댓글 수: 4
madhan ravi
2018년 11월 7일
B = [1 NaN, NaN,3,1;1 NaN, 1,NaN,1;1 NaN, 1,NaN,1;1 NaN, NaN,NaN,1;1 NaN, 2,NaN,1]
B(isnan(B))=[]
a=factor(numel(B));
m = max(a);
n=min(a);
reshape(B,m,n)
추가 답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 ANOVA에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!