MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#" onclick="window._kiq.push(['set', { 'event': 'Turn off MT' }]);">ここ</a>」をクリックしてください。

0

how to read a text file using dlmread that is not in matlab directory?

Saba Yousaf さんによって質問されました 2018 年 8 月 11 日
最新アクティビティ Saba Yousaf さんによって コメントされました 2018 年 8 月 11 日
Hi there... how to solve this error "Error using dlmread (line 122) The file 'an.text' could not be opened because: No such file or directory", as my file is located at desktop in text format. kidnly help me out to read data in this file. thanks in advance

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: Ameer Hamza
2018 年 8 月 11 日
 採用された回答

If it is not on MATLAB path, you can still read it by specifying the correct Absolute or relative paths. For example, the following uses an absolute path
dlmread('C:\{path_to_folder}\ann.txt')
Where 'C:' is the drive in which folder is located. Similarly, on Mac or Linux, you will need respective absolute paths.

  8 件のコメント

In this attachment first row contains the characters then how can i specify them in syntax "dlmread(filename, delimiters, r1 c1)" to read all data?
dlmread() can't read non-numeric data. In your file, the first column contains dates. For you case, more appropriate is
data = readtable('an.txt')

サインイン to comment.



Translated by