Removing Missing Data from Corresponding Matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi, I have a 10848 x 1 matrix called Modeled_Infill where each row corresponds to a different river. I removed Nans from that matrix using the following code:
[row,col]=find(isnan(Modeled_Infill));
index=isnan(Modeled_Infill);
Modeled_Infill=rmmissing(Modeled_Infill);
This reduced the Modeled_Infill matrix to 10834 x 1. Since I'm working with other parameters that have the same river assignments as the Modeled_Infill matrix, I then wanted to remove those rivers from the other parameters that had missing values from the original Modeled_Infill matrix. I was able to do this with the parameters that had the same dimensions (10848 x 1) as Modeled_Infill by using the index term above.
QRiver_prist(index)=[];
I now want to remove the corresponding rows of another parameter, POCtotal; however, the dimensions of that matrix is 10848 x 105, where each column represents changes in that parameter over time but for the same rivers seen in QRiver_prist and in Modeled_Infill. I tried using index again but that doesn't work (I'm assuming due to the 105 columns instead of 1). How can I remove the rivers that had missing data in Modeled_Infill from this other parameter, POCtotal? Thanks!
POCtotal(index)=[];
댓글 수: 0
채택된 답변
추가 답변 (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!