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 CenterFile Exchange에서 Workspace 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