Info

This question is closed. Reopen it to edit or answer.

Check from MEX-file if Matlab started with GUI

1 view (last 30 days)
Adrian Buerger
Adrian Buerger on 24 Jul 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello everyone,
the headline already describes pretty well what I have to do: I have to check from a MEX-file whether Matlab on Linux has been started with or without GUI.
Background: I run a C/C++-Program (from wich I can use the sources, but am not allowed to change them!) from Matlab. I wrote several (additional) MEX-files that allow the program to use mexCallMATLAB to evaluate m-files. Now I need to know where I have to direct the output from a function callable from my MEX-files, because up to now I can only redirect it by changing hard-coded parameters (but I already can direct it to the right outputs!).
Up to R2012x, a check was possible using the C++-function isatty(), but from R2013a on, this check fails, and Matlab appears to be started from console only, even though i has been started with GUI.
I couldn't find an answer to my question anywhere, so I'm asking you if someone maybe knows a functions like this, or another solution to my problem!
Thank you people in advance!
Greetings, Adrian

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!