%% Obtain Field Information for Instrument in Instrument Set
% Retrieve the instrument set variable ExampleInst from the data file InstSetExamples.mat. ExampleInst contains three types of instruments: Option, Futures, and TBill.

load InstSetExamples; 
instdisp(ExampleInst)

% Get the fields listed for type 'Option'.

[FieldList, ClassList] = instfields(ExampleInst, 'Type','Option') 

% Get the fields listed for types 'Option' and 'TBill'.

FieldList = instfields(ExampleInst, 'Type', {'Option', 'TBill'})

% Get all the fields listed in any type in the variable.

FieldList = instfields(ExampleInst) 

% Copyright 2020 The MathWorks, Inc.