Removing Missing Data from Corresponding Matrix

1 visualización (últimos 30 días)
Derrick Vaughn
Derrick Vaughn el 5 de Ag. de 2020
Respondida: KSSV el 5 de Ag. de 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)=[];

Respuesta aceptada

KSSV
KSSV el 5 de Ag. de 2020
POCtotal(index,:)=[];

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by