How could I import an excel file with NAN value into MATLAB?
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/323026/image.jpeg)
Réponses (1)
Anjaneyulu Bairi
le 31 Jan 2024
Modifié(e) : Anjaneyulu Bairi
le 31 Jan 2024
Hi,
I understand that you are trying to import an Excel file that has Nan values in it. You can use the "readtable" function to import an excel file in MATLAB, and if you have NaN as a string, then use the "TreatAsMissing" option while reading the excel file.
Here is the example :
dataTable = readtable(filename, 'TreatAsMissing', {'NaN'});
Here is the documentation link for "readtable" : https://in.mathworks.com/help/matlab/ref/readtable.html
Hop this helps.
0 commentaires
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!