getvaropts 함수를 사용하여 변수 가져오기를 제어하는 variable import options 객체에 액세스합니다.
파일에서 가져오기 옵션을 생성합니다. options 객체는 개별 변수 가져오기 옵션의 모음입니다.
opts = detectImportOptions('patients.xls')
opts =
SpreadsheetImportOptions with properties:
Sheet Properties:
Sheet: ''
Replacement Properties:
MissingRule: 'fill'
ImportErrorRule: 'fill'
Variable Import Properties: Set types by name using setvartype
VariableNames: {'LastName', 'Gender', 'Age' ... and 7 more}
VariableTypes: {'char', 'char', 'double' ... and 7 more}
SelectedVariableNames: {'LastName', 'Gender', 'Age' ... and 7 more}
VariableOptions: Show all 10 VariableOptions
Access VariableOptions sub-properties using setvaropts/getvaropts
PreserveVariableNames: false
Range Properties:
DataRange: 'A2' (Start Cell)
VariableNamesRange: 'A1'
RowNamesRange: ''
VariableUnitsRange: ''
VariableDescriptionsRange: ''
To display a preview of the table, use preview
opts — 파일 가져오기 옵션 SpreadsheetImportOptions | DelimitedTextImportOptions | FixedWidthImportOptions
파일 가져오기 옵션으로, detectImportOptions 함수에 의해 생성된 SpreadsheetImportOptions, DelimitedTextImportOptions 또는 FixedWidthImportOptions 객체로 지정됩니다. opts 객체는 변수 속성, 데이터 위치 속성, 대체 규칙 같은 데이터 가져오기 프로세스를 제어하는 속성을 포함합니다.
selection — 선택한 변수 문자형 벡터 | string형 스칼라 | 문자형 벡터로 구성된 셀형 배열 | string형 배열 | 인덱스로 구성된 배열 | 논리형 배열
선택한 변수로, 문자형 벡터, string형 스칼라, 문자형 벡터로 구성된 셀형 배열, string형 배열, 숫자형 인덱스로 구성된 배열 또는 논리형 배열로 지정됩니다.
변수 이름(또는 인덱스)은 opts 객체의 VariableNames 속성에 포함된 이름의 서브셋이어야 합니다.
varOpts — 선택한 변수에 대한 유형 종속 옵션 variable import options 객체로 구성된 배열
선택한 변수에 대한 유형 종속 옵션으로, variable import options 객체로 구성된 배열로 반환됩니다. 이 배열은 selection 인수에 지정된 각 변수에 대응되는 객체를 포함합니다. 변수의 데이터형에 따라, 배열에 포함되는 각 객체는 숫자, 텍스트, logical, datetime 또는 categorical 데이터형일 수 있습니다.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.