Can detectImportOptions automatically return the fixedWidthImportOptions?

조회 수: 14 (최근 30일)
Jingying Tian
Jingying Tian 2019년 4월 3일
댓글: Stephen23 2025년 11월 26일
I have many text data to be imported in MATLAB.
But when I use T = readtable(filename,opts) and opts = detectImportOptionsdetectImportOptions(filename), the opts always return a DelimitedTextImportOptions, while what I needed is fixedWidthImportOptions.
Is there any method to return fixedWidthImportOptions by the function detectImportOptions before each text data be readed.
I cannot specify the format of fixedWidthImportOptions since every text data has different variable width.
  댓글 수: 2
Sharannya Ranjith
Sharannya Ranjith 2019년 4월 10일
There are two ways of generating a 'fixedWidthImportOptions': through the generic constructor (which would require to manually populate the options), or through 'detectImportOptions'. There is no way to force 'detectImportOptions' to return the fixedWidthImportOptions'. You may want to generate IO functions via the import tool if you need to restrict the mannerism.
Stephen23
Stephen23 2025년 11월 26일
"Is there any method to return fixedWidthImportOptions by the function detectImportOptions before each text data be readed."

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by