Replacing specific rows in a matrix.
이전 댓글 표시
I would like to replace the cells with the following features (those whose types are 9 or 12 and their ID is one of these numbers, 2,11,12). Then I want to replace them with NaN. However, indexB is a vector of 0 s only.
indexB = ( (Type == 9|Type ==12) & (IDscript ==2|IDscript==11|IDscript==12) );
RT(indexB)=NaN;
댓글 수: 2
James Tursa
2018년 5월 10일
Have you looked at your data to make sure you have any spots that match all of the criteria?
Elaheh
2018년 5월 10일
채택된 답변
추가 답변 (1개)
Elaheh
2018년 5월 10일
0 개 추천
댓글 수: 1
sloppydisk
2018년 5월 10일
Yeah that should work. You can attach the script if it's still not working for you.
카테고리
도움말 센터 및 File Exchange에서 Library Development에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!