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

load deriv.mat;
FwdRates = trintreepath(HWTree, [1 2 3])

% This returns the rates at the tree nodes located by starting at 0, taking the up branch at the first node, the middle branch at the second node, and finally the bottom branch at the third node.
% You can visualize this with the treeviewer function.

treeviewer(HWTree)

% Copyright 2020 The MathWorks, Inc.
% Copyright 2020 The MathWorks, Inc.