MATLAB: How to retrieve startup options of current matlab session
nodesktop startup
Hi, I want to change the behavior of a function it is running in command line only mode (-nodesktop startup option).
How can I know what startup options were used in the session were the function is running?
Thanks
Best Answer
Camilo - you can try using theusejava command to determine if a specific feature is available. With the option'desktop', you can determine if theMATLAB interactive desktop is running or not.
For example, if using MATLAB normally (not launching from command line), execute the statement from the Command Window
isDesktopAvail = usejava('desktop');
sets theisDesktopAvail flag to one/true.
If launching MATLAB from the command line with
./matlab -nodesktop -nosplash
then executing the same command (from above) setsisDesktopAvail to 0/false.
Best Answer