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

1 visualizzazione (ultimi 30 giorni)
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);

Risposte (1)

Stephan
Stephan il 14 Set 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

Categorie

Scopri di più su Workspace Variables and MAT Files in Help Center e File Exchange

Tag

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by