How to alter the unimportable cells in the import wizard

I need to import a csv file of my data into matlab. My file has some missing data in it, which I can't do anything about. When I imported it, matlab automatically added a 0 to each missing cell, I need to change this to a NoData marker. I can click on the unimportable cells tab and then change it so that blank cells are replaced with ND instead of 0, but as soon as I click elsewhere it just changes back. How do I fix this?

1 comentario

It should be replacing with NaN by default (at least for numbers).
What does the data look like once it's imported? Can you show us a sample file and sample result?

Iniciar sesión para comentar.

Respuestas (1)

per isakson
per isakson el 13 de Feb. de 2013
Editada: per isakson el 13 de Feb. de 2013
The function textscan has the property
EmptyValue, Value to return for empty numeric fields in delimited files. NaN
AFAIK: the import wizard does not provide this feature.
However, as Sean points out
1,,2,3
as a row in the text-file, returns
[ 1 nan 2 3 ]

Categorías

Más información sobre Large Files and Big Data en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 13 de Feb. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by