Skip to content

SDMX Connector for MATLAB

Attilio Mattiocco edited this page Jul 3, 2015 · 23 revisions

MatSDMX is the MATLAB Connector for SDMX.

All the instructions that follow refer to linux, but they can be easily adapted to Windows installations.


How to build it

The only part of the connector that needs to be built is the Java library. Instructions can be found in the java section

NOTE: building the java library is not strictly necessary. A jar file, ready to be used, can be retrieved from the R package


How to install it

  1. Clone the repository or download a the full project in zip format and unpack it. Get the m-files from the project MATLAB directory.

  2. Add the m-files to the MATLAB search path. This task can be accomplished in different ways. You can refer to the MATLAB online help for the most suitable way.

  3. Build the java library or download it from the R package

  4. Add the Java library to the MATLAB static classpath. The steps are described in the MATLAB online help

NOTE: Adding the Java library to the dynamic classpath does not always work, due to classloading problems.


How to use it

Help pages can be obtained in the usual way:

doc MatSDMX

Get the list of available data providers:

getProviders

Get the list of available data flows for data provider ECB:

flows=getFlows('ECB')

If we want to refine the search with a search pattern:

exr=getFlows('ECB', '*Exchange*')

Get the list of dimensions for data flow EXR:

dims=getDimensions('ECB', 'EXR')

As an alternative, we can explore all the metadata of interest with the graphical SDMX helper:

sdmxHelp

Finally, let's get some data (I guess this is what you really want...)

single time series, freq=A, CURRENCY=USD
result = getTimeSeries('ECB', 'EXR.A.USD.EUR.SP00.A')

multiple time series, FREQUENCY=A (annual), all currencies
result = getTimeSeries('ECB', 'EXR.A.*.EUR.SP00.A')

multiple time series, all currencies, freq = A or M (monthly)
result = getTimeSeries('ECB', 'EXR.M+A.*.EUR.SP00.A')

NOTE: data calls will return a cell array of timeseries classes. The time series metadata is stored in the UserData slot (the dimensions) and in the DataInfo.UserData slot (the attributes)