read matrix from .txt

8 ビュー (過去 30 日間)
lucas
lucas 2013 年 10 月 20 日
コメント済み: lucas 2013 年 10 月 20 日
hello, can anyone tell me what do i have to do to read this matrix saved on a.txt file?
1 2 3 4
5 6 7 8
9 10 11 12
thx :)

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 20 日
M=dlmread('filename.txt')
  12 件のコメント
Cedric
Cedric 2013 年 10 月 20 日
編集済み: Cedric 2013 年 10 月 20 日
Ok, there are special characters in your file, so the issue is probably the way you saved it with Excel. Try exporting the Excel file as CSV (Comma Separated Values) even if you name the file with a .txt extension.
lucas
lucas 2013 年 10 月 20 日
thx mate!! works fine now with that comma thing :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by