SourceForge.net Logo
Home | News | Download | For Developers | Credits | FAQ | OPeNDAP | Tutorial | Project

Rolling Your Own...

Click here to retrieve the most recent source code for compiling the mex-file on your own, along with some additional m-files required to run mexnc. If you just want to get a mex-file and not have to worry about compiling anything, then you are in the wrong place and need to go back to the main downloads web page. Compiling the mex-file is easiest on UNIX and UNIX-like platforms.

Windows users have a particularly daunting road ahead of them if they wish to compile the mex-file themselves. But hey, if you are feeling particularly brave and have Microsoft Visual Studio, then go ahead and give it a try, knock yourself out.

But for the rest of you, first thing is to copy the mexopts.sh file out of your matlab installation directory into the directory where you unpacked mexnc. In most cases you will only need to insert 5 lines into the bottom section of the mexopts.sh file, as indicated in many examples below, and the ONLY line that would ever really be different is the NETCDF variable which specifies where netCDF is installed on your system. Type "make" and that should do it. There are exceptions, though...

Examples

If you are on a windows system, you should take a look at the win32_make_mexnc.m m-file.

For information on compiling netCDF, go to Unidata's NetCDF website.


John Evans: IMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521
Email address is john.g.evans.ne@gmail.com