Trouble reading number from file
Show older comments
I am trying to read a txt file into an array. When I import the file mannually it opens normally into a desired 3000x10 matrix. When I am trying to user textread in order to import the data textread(data.txt) I am getting the following error:
Trouble reading number from file (row 1, field 2) ==> , 0.82477773784066744,
0.028192741339486998, 0
Error in ==> textread at 176
[varargout{1:nlhs}]=dataread('file',varargin{:});
3 Comments
Azzi Abdelmalek
on 22 Jul 2014
How your text file looks like?
Kris zenitis
on 22 Jul 2014
Michael Haderlein
on 22 Jul 2014
I think dlmread is better suited for that file.
Answers (1)
Azzi Abdelmalek
on 22 Jul 2014
data=importdata('filename.txt')
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!