%% Count Instruments in Instrument Variable
% Retrieve the instrument set ExampleInst from the data file InstSetExamples.mat. ExampleInst contains three types of instruments: Option, Futures, and TBill.

load InstSetExamples; 
instdisp(ExampleInst)

% Count the number of instruments contained in the variable ExampleInst.

NInst = instlength(ExampleInst)

% Copyright 2020 The MathWorks, Inc.