isconnection

Determine if connections to FRED data servers are valid

Syntax

x = isconnection(c)

Arguments

c

FRED® connection object created with fred.

Description

x = isconnection(c) returns x = 1 if a connection to the FRED data server is valid, and x = 0 otherwise.

Examples

collapse all

Establish a connection c to a FRED® data server.

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

Verify that c is a valid connection.

x = isconnection(c)
x =

     1

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)

Introduced in R2006b