remove nan from table with string and numeric type

2 visualizaciones (últimos 30 días)
sensation
sensation el 12 de Jun. de 2017
Comentada: sensation el 12 de Jun. de 2017
Hi,
I have data as cell data type like:
'HRD_0085' [ 190.7900]
'HRD_0086' [ 11.6500]
'WAT_0087' [ NaN]
etc.
I was trying to apply formula like below in order to get rid of all rows with nan but it doesnt work:
out = C(any(cellfun(@(x)any(~isnan(x)),C),2),:);
Any clue?
Thanks a lot

Respuesta aceptada

Stephen23
Stephen23 el 12 de Jun. de 2017
C = {
'HRD_0085' [ 190.7900]
'HRD_0086' [ 11.6500]
'WAT_0087' [ NaN]
};
C(~cellfun(@isnan,C(:,2)),:)

Más respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox 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