File Exchange

image thumbnail


version (1.63 MB) by John Evans
Mex file interface for reading various raster image formats, optionally providing georeferencing.


Updated 01 Sep 2006

No License

GDAL is a library capable of reading a plethora of raster image formats, and MEXGDAL is a mex file interface for making its I/O capabilities available to MATLAB. As well as reading the image data itself, it can read the image metadata and georeferencing information.

Cite As

John Evans (2020). MEXGDAL (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Moj S

I am trying to run the "test_gdal.m" but I got this error:
Output argument "z" (and maybe others) not assigned during call to "mexgdal".

Error in gdaldump (line 67)
metadata = mexgdal ( gdalfile, options );

Should I download anything else??
Thank you

I am trying to do working into archlinux system, but I don't see to work this one. Some recommendation?


Any updates on this?... it doesn't work with Matlab 2016a, and gdal 1.10.1. I get the following error when I try to use gdaldump to read a geotiff:
Output argument "z" (and maybe others) not assigned during call to "mexgdal"

mesgdal does not return anything. no code is found for execution except comments. It causes error

Anthony Kendall

It worked perfectly, and the precompiled .DLL for windows worked right out of the box!


Fixed some outdated statements in the DocBook documentation. Incorporated more mlint suggestions.

Some updated build notes. M-files have been cleaned up a bit according to the information provided by mlint.

Changed a few m-files around to allow for greater flexibility. Rewrote documentation in docbook format.

Added capability for redefining the origin, extent of the image to be read, and scaling of the output image. Considerable code cleanup.

Updated help information.

Added Mandrake-10.0 version. Moved mexfiles into platforms subdirectory.

MATLAB Release Compatibility
Created with R14SP2
Compatible with any release
Platform Compatibility
Windows macOS Linux