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

1 vue (au cours des 30 derniers jours)
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);

Réponses (1)

Stephan
Stephan le 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

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Tags

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by