Running gnuplot from Matlab under Linux

I'm trying to run gnuplot directly from Matlab (works on Debian Linux), but I get the following error:

>> unix('gnuplot defaults_loan10.p');
gnuplot: /usr/local/MATLAB/R2011b/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0)

      

Running gnuplot from the console works fine. How can I fix this?

+3


source to share


1 answer


This is because Matlab uses its own LD_LIBRARY_PATH

try using the command setenv

to get this environment variable back as you like.

For example:



setenv('LD_LIBRARY_PATH','/usr/lib')

      

You can check the contents of LD_LIBRARY_PATH before and after by running:

!echo $LD_LIBRARY_PATH

      

+3


source







All Articles