how to read csv file with space character?

5 views (last 30 days)
i get the data with a matrix in one unit of the file,but they are seperated by sapce characters(' ').so when i used csvread i got zero and it didn't work...can sonebody help?

Accepted Answer

Stephen23
Stephen23 on 28 Apr 2017
Edited: Stephen23 on 28 Apr 2017
If the delimiter are simple space characters, then use dlmread:
M = dlmread(filename,' ');
If the file is more complex, such as having multiple delimiters together, then use textscan

More Answers (0)

Categories

Find more on 元胞数组 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!