how to read csv file with space character?

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

Asked:

on 28 Apr 2017

Commented:

on 28 Apr 2017

Community Treasure Hunt

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

Start Hunting!