How to import blanks cells as Nans
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Cristina
le 27 Avr 2015
Commenté : Ahmed Nirjhar Alam
le 23 Juil 2020
I have a file (created in excel) with >100k rows and 22 columns. Many of the cells are blanks (not zeros). If I use csvread to import the data Matlab changes the banks to zeros. I cannot first change the blanks to 99999 because excel crashes. Is there a way to make Matlab import the blanks as Nan's?
0 commentaires
Réponse acceptée
Mohammad Abouali
le 27 Avr 2015
a=importdata('sampledata.csv')
a =
1 2 3 4 5
1 2 3 NaN 5
1 NaN 3 4 5
1 2 3 NaN 5
1 2 3 4 5
1 2 3 4 NaN
3 commentaires
Ahmed Nirjhar Alam
le 23 Juil 2020
Is there any equivalent substitute for when I have a file with multiple datatypes(such as integers, doubles, strings) in different columns?
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!