How can I read text file in MATLAB? (files include text)

3 Ansichten (letzte 30 Tage)
Kyungsun Ha
Kyungsun Ha am 29 Jun. 2017
Kommentiert: Walter Roberson am 29 Jun. 2017
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?

Antworten (1)

Astik Sachan
Astik Sachan am 29 Jun. 2017
Bearbeitet: Walter Roberson am 29 Jun. 2017
  1. Add Folder where your ".txt" file is to path of matlab.
  2. Or you can use absolute path to the text file to read it.

Kategorien

Mehr zu 검색 경로 finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!