I\'m looking for a way to start an application from within Matlab. The thing is, my Matlab script saves some results to a file, which should then be opened in the associated
As I indicated in my Edit above, this could be a solution:
% Save library paths
MatlabPath = getenv('LD_LIBRARY_PATH');
% Make Matlab use system libraries
setenv('LD_LIBRARY_PATH',getenv('PATH'))
disp('Starting Blender...')
system( ['blender ', Directory, FileName, '.blend'] )
% Reassign old library paths
setenv('LD_LIBRARY_PATH',MatlabPath)
However, with the other way to start an application, you can immediately return to Matlab after starting it:
% Start Blender and immediately return to Matlab
!blender Geometry.blend &
The ampersand (&) is the key to immediately return to Matlab after starting the application , but starting Blender this way I cannot provide a variable FileName like I can do with system(...).
So, anybody got a clue on how to
use !program_name with a variable filename
or
use system(program_name) with an option such that Matlab just starts the application (and doesn't wait with returning until the application has been closed)