How to import a txt file into matlab?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,guys.I have to write a code that reads a .dat file which contains weather stats for NYC.I' ve used -load file_name.txt- function but got an error.I also have to rearrange that dat file and save that new file as another dat file.Thanks
5 commentaires
Star Strider
le 30 Déc 2016
The ‘.dat’ file seems to be what you were having problems with. You have (apparently copied and pasted) the data in the ‘NYCtemp.txt’ file into your code.
What specifically do you want help with? If you need help with the ‘.dat’ file, please attach it and tell us what you want to do with it.
Réponses (1)
John D'Errico
le 30 Déc 2016
So learn to use one of the many tools to read a file. Start with textread, or more basic tools like fopen, fread. Then learn about how to save a file. Again, lots of tools, starting with save.
We don't do your work for you though. That is your job. Anyway, you have not asked a clear question that tells anybody anything about the file, or what error you got. So we cannot possibly help you more here. The crystal ball is so foggy today that we cannot see into your mind or your computer.
0 commentaires
Voir également
Catégories
En savoir plus sur Standard File Formats 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!