Read cdf files in matlab
Suppose you have been using the Autoplot URI (data address) to read data into Autoplot. MATLAB> apds = Īutoplot can be used to read data into IDL and MATLAB
Now we can test to see that the jar file is connected: Note older versions of Matlab use Java 6 and will not work with Autoplot version v2015a_5 and newer. MATLAB> javaaddpath( '/tmp/autoplot.jar' ) MATLAB is able to add the jar after the session is started, with the command "javaaddpath":
#Read cdf files in matlab code#
If this seems large, consider that this contains code to read NetCDF, OpenDAP, CDF, Excel, and many other forms of data.
#Read cdf files in matlab full#
Note this is a full Autoplot and can be used from the command line, bypassing the mechanism normally used to launch Autoplot. so file from C and Fortran, and contains compiled code and also needed resources. This 30 megabyte jar file is similar to a. For MATLAB, you don't need to download the file, but to be consistent with IDL, we will download it to /tmp/autoplot.jar or some location appropriate for your workstation. For example, the development release at has a link to a single jar version here. In either case, you'll need to download the Autoplot "single jar" release that is available along with each release of the software. You can verify the Java version by calling the Java method: In these examples, "Unix>" is used to indicate commands entered into a Unix BASH shell, and "MATLAB>" an MATLAB v7.7 session. For example, Autoplot is able to write data to a number of data formats, and this code is useful in Matlab as well.įirst we need to connect the Autoplot code to the environment. Last, Autoplot can automatically retrieve and manage data from remote sites via FTP and HTTP, so this mechanism can be used in IDL and MATLAB as well.Īutoplot contains a number of codes that are useful, in addition to reading data. Further, Matlab can read data from CDF files, but its low-level CDF interface makes Autoplot attractive, because you can access data with just several lines of code. For example, it's difficult to read data from an Excel worksheet into IDL, but since Autoplot can read this data, it becomes just as easy to read data from this source as it is a table of ASCII data.
Autoplot is able to read data from a variety of input sources using compact URIs to specify data locations, making it useful accessing digital data. Both IDL and MATLAB make it extremely easy to use Java code in these environments.