Borrar filtros
Borrar filtros

Why delete columns whose output value is NaN not correct?

2 visualizaciones (últimos 30 días)
Why delete columns whose output value is NaN not correct?
Why delete columns whose output value is NaN not correct?
2400*10350
(2400 images) (10350 features)
clear all
load ('Vactor1-100')
A=FeatureVector;
Out1 = A(:,~any(isnan(A),1));
my output is [] WHY?
  2 comentarios
Vladimir Sovkov
Vladimir Sovkov el 31 de Dic. de 2019
Probably, all the columns of your matrix contain at least one NaN each...
jenifer Ask
jenifer Ask el 31 de Dic. de 2019
Question 1:
How do I delete the values of all rows that are NaN?
Question 2:
How to replace 0 values of all rows that are NaN?

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 31 de Dic. de 2019
1)
Out1 = A(~any(isnan(A),2), :);
2)
Out1 = fillmissing(A, 'constant', 0);

Más respuestas (0)

Categorías

Más información sobre Images 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