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

1 回表示 (過去 30 日間)
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);

回答 (1 件)

Stephan
Stephan 2018 年 9 月 14 日
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

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT Files についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by