textread() for Importing Values into Multi-Column Matrices

3 ビュー (過去 30 日間)
Christopher Cochran
Christopher Cochran 2020 年 4 月 1 日
編集済み: Christopher Cochran 2020 年 4 月 1 日
Is there were a way to specify that the output of the textread function be saved into matrices with more than one column?
Yes:
[mat1(:,1), mat1(:,2), mat1(:,3), mat2, mat3(:,1), mat3(:,2), mat3(:,3), mat4] = textread('myfile.txt', %f %f %f %*s %*s %*s %f %f %f)

回答 (1 件)

per isakson
per isakson 2020 年 4 月 1 日
編集済み: per isakson 2020 年 4 月 1 日
"is there were a way to specify that the output of the textread" See textscan, 'CollectOutput', true
"Is this possible with textread()?"
  • Note: textread is not recommended. Use textscan instead.
  • Not as far as I know

カテゴリ

Help Center および File ExchangeData Import and Export についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by