How to filter out rows with NaNs from one variable and the same rows from another variable without NaNs.

2 visualizaciones (últimos 30 días)
I have a numerical variable X [506x24706] and a numerical variable Y [506x1]. Variable Y includes some NaNs. How can I filter out rows with NaNs from Y and at the same time filter out the same corresponding rows from X and create a new Y and a new X?

Respuestas (1)

Paolo
Paolo el 24 de Jul. de 2018
indx = isnan(Y);
Y(indx) = [];
X(indx,:) = [];

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by