%% Determine Shape of Recombining Trinomial Tree
% This example shows how to obtain information on a recombining trinomial tree's shape.
% Create a HW tree by loading the example file.

load deriv.mat; 

% With treeviewer you can see the general shape of the HW interest-rate tree.

treeviewer(HWTree)

% Use trintreeshape to display the shape of the binomial tree.

[NumLevels, NumPos, IsPriceTree] = trintreeshape(HWTree) 

% Copyright 2020 The MathWorks, Inc.