%% FRED Workflow Example

%   Copyright 1999-2014 The MathWorks, Inc.

% Connect to FRED
c = fred;

series = 'DEXUSEU';  % retrieve data for the DEXUSEU series
fromdate = '01/01/2012'; % beginning of date range for historical data
todate = '06/01/2012'; % ending of date range for historical data

% Fetch All Data
d = fetch(c,series);

% Show data
d
d.Data(1:5,:)

% Retrieve Historical Data
d = fetch(c,series,fromdate,todate);

% Show data
d
d.Data(1:5,:)

% Close FRED Connection
close(c);