I am using Matlab 2019a on Ubuntu 18.04 and am trying to run an executable (which requires certain netcdf libraries) inside a Matlab script via system(./my_program.x). When doing so, I get the following error:
symbol lookup error: /usr/lib/x86_64-linux-gnu/libnetcdff.so.6: undefined symbol: ncopts
However, if I run ./my_progam.x directly from the console, it runs just fine.
Curiously, running the exact same script in Matlab 2018a also works fine.
I am wondering whether this might be because Matlab 2019a uses its own netcdf libraries, which for some reason don't work with this particular executable. I'm not too bothered by the problem, given that I can circumvent it using an earlier Matlab version, but for convenice, I was wondering whether it is possible to instruct Matlab to essentially open the standard console, and execute ./my_progam.x as much "outside" of the Matlab environment as needed, so that it works in the same way as when I do it manually.
Best Answer