Command window version of "replace unimportable cells with..." ?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Winston Black
il 6 Giu 2016
Risposto: Steven Lord
il 6 Giu 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 Commenti
Risposta accettata
Steven Lord
il 6 Giu 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Cell Arrays in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!