%% Compute the Duration of LIBOR-Based Interest-Rate Swaps
% This example shows how to compute the duration of LIBOR-based interest-rate swaps using the following data.

SwapFixRate = 0.0383;
Tenor = 7;
Settle = datenum('11-Oct-2002');

[PayFixDuration GetFixDuration] = liborduration(SwapFixRate,... 
Tenor, Settle)

% Copyright 2015 The MathWorks, Inc.