error in fopen when use dlmread

1 次查看(过去 30 天)
Skydriver
Skydriver 2018-10-11
评论: Star Strider 2018-10-12
file1 = dlmread('Matched_TNG20100518CISI_N.txt','', 5, 0) fid = fopen(file1, 'r') Axcel1=fscanf(file1,'%g %g %g %g %g\n',[4,Inf])';
Error using fopen File identifier must be an integer-valued scalar of type double.
Any one can help me?

回答(1 个)

Star Strider
Star Strider 2018-10-11
Simply use the one line:
file1 = dlmread('Matched_TNG20100518CISI_N.txt','', 5, 0);
Then, check to see what ‘file1’ contains. It should be a matrix of numeric data that you can access directly.
  4 个评论
Star Strider
Star Strider 2018-10-12
My pleasure.
If my Answer helped you solve your problem, please Accept it!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Import and Export 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by