How to convert a csv into .mat file ? Considering my csv file has one array with non numerical values ?

2 views (last 30 days)
I am trying to conver a csv into mat file but Matlab gives the following error.
Error using dlmread (line 147) Mismatch between file and format character vector. Trouble reading 'Numeric' field from file (row number 1, field number 1) ==> time;idref;ii;iqref;ir;uci;ucr\n
Error in csvread (line 48) m=dlmread(filename, ',', r, c);

Answers (1)

Stephan
Stephan on 14 Sep 2018
Hi,
dlmread will read ASCII-delimited file of numeric data into matrix.
Since you have non numerical values use readtable instead.
Here you find an overview for importing text files.
Best regards
Stephan

Categories

Find more on Data Import and Export in Help Center and File Exchange

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!