Removing Missing Data from Corresponding Matrix

4 vues (au cours des 30 derniers jours)
Derrick Vaughn
Derrick Vaughn le 5 Août 2020
Réponse apportée : KSSV le 5 Août 2020
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)=[];

Réponse acceptée

KSSV
KSSV le 5 Août 2020
POCtotal(index,:)=[];

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by