Command window version of "replace unimportable cells with..." ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Winston Black
el 6 de Jun. de 2016
Respondida: Steven Lord
el 6 de Jun. de 2016
I am trying to import some data from a csv file of mixed data type (mostly numeric but one column is essentially datetime). Sometimes numeric columns will contain some NaN values, but they are recorded as NAN instead of NaN or nan which Matlab recognizes. I can import this data through uiimport using the option to replace unimportable cells with NaN. Is there a way to get this same functionality without having to interact with the ui using an import function (e.g., csvread,importdata, etc.)?
0 comentarios
Respuesta aceptada
Steven Lord
el 6 de Jun. de 2016
Open in the Import Tool one file that can serve as a template for the rest of the files to be imported. Set the options that you want to use to import the file then select Generate Function from the Import button (click the small triangle in the corner of the button.) The function that is generated will include a section that handles the unimportable data. Use that to process the data for the rest of the files you want to import.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Cell Arrays en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!