How can I read text file in MATLAB? (files include text)
Afficher commentaires plus anciens
Greetings.
Actually, I want to read text file. but, when I write like
fopen('pathway\[AM] Ch1 (28-Jun-2017 16-53-20).txt')
this, ans(file ID) is -1.
So I go to folder where txt file located directly, but It cannot run function because function in the MATLAB folder(My Documents).
How can I read text file without folder movement?
Réponses (1)
Astik Sachan
le 29 Juin 2017
Modifié(e) : Walter Roberson
le 29 Juin 2017
0 votes
- Add Folder where your ".txt" file is to path of matlab.
- Or you can use absolute path to the text file to read it.
1 commentaire
Walter Roberson
le 29 Juin 2017
You can use fullfile() to help construct absolute paths.
Catégories
En savoir plus sur 텍스트 파일 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!