creating an empty cell in an array
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ahmed Abdulla
el 21 de Jun. de 2019
Comentada: Akshay Malav
el 21 de Jun. de 2019
i have an array most made up of numbers and some are NaN i would like to make the NaN cells empty because i have a plotting function that doesnt accept NaN and when i assign it to 0 it affects the resulting graph, so im not really sure of how to make it blank with no numerical value
Respuesta aceptada
Akshay Malav
el 21 de Jun. de 2019
Editada: Akshay Malav
el 21 de Jun. de 2019
Then use this code.
A = [1 NaN 2];
B = rmmissing(A) % will remove NaN from array A
The B array wil be [1 2]
2 comentarios
Akshay Malav
el 21 de Jun. de 2019
Then you can ignore the corresponding values in the second array .
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!