How to detect data types automatically as in uiimport but without ui?

조회 수: 1 (최근 30일)
cprogrammer
cprogrammer 2017년 11월 10일
댓글: cprogrammer 2017년 11월 11일
When I open the data which consist of string and numbers via Matlab uiimport tool and it automatically detects numeric and string columns correctly but when I read data with readtable, it determines some columns as string even though they are numbers in uiimport. I want a format same as uiimport but do it without user interface(since I have many different csv files). Is there any such function?

답변 (1개)

ES
ES 2017년 11월 11일
You have tried xlsread on the csv? xlsread can get raw, txt and numbers on different variables.
[NUM,TXT,RAW]=xlsread('mycsvfile.csv')
  댓글 수: 1
cprogrammer
cprogrammer 2017년 11월 11일
I tried it but it produces this error:
Error using xlsread (line 260)
Unable to read XLS file *.csv. File is not in
recognized format.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by