Save Matrix values when values change from NaN to a Number in MATLAB
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a 3x15000 matrix and I want to save the segments during a change from NaN to a number. So I have large sections that all 3 rows are NaN and when it changes I want to generate a new matrix. Is it best to index the start and end point? How do I set a flag in order to step through all the data?
댓글 수: 0
답변 (1개)
Iain
2014년 9월 8일
if you ONLY get nans in entire columns, this'll work:
numbers = oldmatrix(~isnan(oldmatrix));
numbers = reshape(numbers, 3, []);
댓글 수: 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!