Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


devel:misc:matlab

This is an old revision of the document!


Run Metafor from Matlab

Problem

Matlab provides its own version of some libraries and redefines the environment variables. When you run Metafor with the system command, the Matlab PATH is used and Metafor crashes because it uses incompatible libraries, at least in Linux.

Solution

One way to overcome the problem is to temporarily redefine the Matlab path before running Metafor :

matlabPath = getenv( 'LD_LIBRARY_PATH' );
setenv( 'LD_LIBRARY_PATH', getenv('PATH') )
system( '/home/user/Metafor/release/bin/Metafor -nogui -run cont2' );
setenv( 'LD_LIBRARY_PATH', matlabPath )

Feel free to give a less dirty solution if you have one.

devel/misc/matlab.1422873441.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki