Replacing NaN with blanks in a matrix
Mostrar comentarios más antiguos
I've a matrix which looks like the one attached. How do I replace NaNs with blank spaces without altering anything else?
Thanks in advance.
Respuestas (1)
Ridwan Alam
el 6 de En. de 2020
0 votos
I believe you are looking for fillmissing() or rmmissing():
4 comentarios
alok pandey
el 9 de En. de 2020
Ridwan Alam
el 9 de En. de 2020
Editada: Ridwan Alam
el 9 de En. de 2020
Alok, sure, just trying to help here.
If you can kindly explain what you mean by "gone". If you mean empty cells, have you ever tried to create a "matrix" with an empty cell? If you are okay with any other format, like string, you can use fillmissing() to fill in spaces. Are you looking for something like that?
blah = string(Phase_data);
blah = fillmissing(blah,'constant',"");
alok pandey
el 9 de En. de 2020
Ridwan Alam
el 9 de En. de 2020
I was wondering if it is possible to replace (remove) NaNs and have 'empty cells' instead.
Nope, I don't think that's possible. Sorry.
Categorías
Más información sobre Interpolation of 2-D Selections in 3-D Grids en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!