I try to use gdal in Matlab and I had same issue and I solved it in this manner.
I tried both on Matlab 2011a and 2013a and probably solution is quite similar.
Mainly, the problem is with proj library and if you try to launch it
1) on bash (gnome-terminal) probably you have proj
Rel. 4.8.0, 6 March 2012
>> which proj
2) on Matlab (on command line) if you try you could see following result:
Rel. 4.4.9, 4 March 2004
>> system('which proj')
I don't know why but this is the problem; you have
undefined symbol: pj_ctx_alloc when proj is less then 4.8.0 and matlab in its
workspace found a wrong library version.
To solve this you have to create a link from your library and matlab
sudo ln -s /usr/lib/libproj.so.0
you have to check if your libproj.so.0 is located in /usr/lib/ or in another
folder on your machine.
Obviously proj must be installed on your system.