%% Extract Entries of a Node of a Recombining Binomial Tree
% Create a BDT tree by loading the example file.

load deriv.mat;
FwdRates = treepath(BDTTree.FwdTree, [1 2 1])

% This returns the rates at the tree nodes located by taking the up branch, then the down branch, and finally the up branch again.
% You can visualize this with the treeviewer function.

treeviewer(BDTTree)

% Copyright 2020 The MathWorks, Inc.