Combine detectImportOptions with datastore?

조회 수: 4 (최근 30일)
michel hillen
michel hillen 2018년 7월 24일
댓글: Keanu Prom 2021년 3월 17일
I have a set of files that I would like to process with a tabularTextDatastore. The content of the files has some specific format (many columns, special encoding, etc.) which is not properly detected by the datastore. Using detectImportOptions and readtable, I am able to load my files in the way that I want. Is there a way to use the 'opts' object that is generated with detectImportOptions as input to the datastore so that I don't have to 'manually' set the relevant Name,Value pairs?

채택된 답변

Harsh
Harsh 2018년 7월 24일
Sounds like you'd like to do the following:
>> opts = detectImportOptions(file,'name',value...);
% Optionally configure various opts.properties
>> ds=tabularTextDatastore(location', opts)
>> read(ds)
You're right in that currently none of the datastores accept an ImportOptions object. Manually configuring the relevant Name,Value pairs is the suggested approach for now.
  댓글 수: 2
Chandan Nene
Chandan Nene 2018년 10월 9일
Is this (that is, allowing ImportOptions to be passed to datastore) planned to be included in near future?
Keanu Prom
Keanu Prom 2021년 3월 17일
Is this functionality available with MATLAB 2021a?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by