how to reshape a matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a matrix that it is 321*531. It includes NaN values, which i have to eliminate them. Thus, I used this code:
m=~isnan(x);
v=x(m)';
then it turned to 1*75638. I wanna reshape it to 321*531,but I don't know how can I do this.I have tried reshape function,but it doesn't work.
please help me. thanks
답변 (1개)
adi kul
2016년 12월 27일
If you are okay with replacing NaN values with Zeros then:
A(isnan(A))=0
Here A will be your matrix.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!