Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

fred

Connect to FRED data servers

Syntax

c = fred
c = fred(url)

Description

example

c = fred returns a FRED® connection to the FRED data server using the default URL 'https://fred.stlouisfed.org/'.

example

c = fred(url) returns a FRED connection using a specific URL.

Examples

collapse all

Connect to the FRED® data server.

c = fred
c = 

  fred with properties:

     url: 'https://fred.stlouisfed.org/'
      ip: []
    port: []

c is a FRED® connection with these properties:

  • url -- The URL for the FRED® data server

  • ip -- The IP address of the proxy server

  • port -- The port number of the proxy server

Retrieve the ip property of the FRED® connection c.

c.ip
ans =

     []

Retrieve the port property of the FRED® connection c.

c.port
ans =

     []

Adjust the display data format for currency.

format bank

Retrieve all historical data for the US / Euro Foreign Exchange Rate series.

series = 'DEXUSEU';

d = fetch(c,series);

d contains the series description.

Close the FRED® connection.

close(c)

Connect to the FRED® data server using the URL 'https://fred.stlouisfed.org/'.

url = 'https://fred.stlouisfed.org/';
c = fred(url)
c = 

  fred with properties:

     url: 'https://fred.stlouisfed.org/'
      ip: []
    port: []

c is a FRED® connection with these properties:

  • url -- The URL for the FRED® data server

  • ip -- The IP address of the proxy server

  • port -- The port number of the proxy server

Retrieve the ip property of the FRED® connection c.

c.ip
ans =

     []

Retrieve the port property of the FRED® connection c.

c.port
ans =

     []

Adjust the display data format for currency.

format bank

Retrieve all historical data for the US / Euro Foreign Exchange Rate series.

series = 'DEXUSEU';

d = fetch(c,series);

d contains the series description.

Close the FRED® connection.

close(c)

Input Arguments

collapse all

URL of the FRED data server, specified as a character vector or string scalar.

Example: 'https://fred.stlouisfed.org/'

Data Types: char | string

Output Arguments

collapse all

FRED connection, returned as a connection object with these properties.

PropertyDescription

url

URL of the FRED data server

ip

IP address of the proxy server

port

Port number of the proxy server

Introduced in R2006b

Was this topic helpful?