Removing Missing Data from Corresponding Matrix

1 次查看(过去 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)=[];

采纳的回答

KSSV
KSSV 2020-8-5
POCtotal(index,:)=[];

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by