how to replace missing values from a double inside a cell array?

1 visualización (últimos 30 días)
I really thanks in advance anybody can tell me how can I replace THE missing values (100000) in the below cell array with NaN.
A = {[1,2,3,100000,4,5,100000],[6,100000,7,100000]};

Respuesta aceptada

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH el 5 de Feb. de 2020
newA=cellfun(@(x) x.*(x~=100000)./(x~=100000),A,'Uni',false)

Más respuestas (1)

BN
BN el 5 de Feb. de 2020
Editada: BN el 5 de Feb. de 2020
index=find(A==100000); %found 100000 in the A
A(index)=NaN; % Replace them by NaN
  2 comentarios
JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH el 5 de Feb. de 2020
'==' does not work with argument of type cell
BN
BN el 5 de Feb. de 2020
Dear JESUS,
You are right, It's my bad. Thank you for letting me know

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings 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