From: bcomisky on 10 Jun 2010 15:06 Is there a way to determine if the matlab desktop is being used? Or alternatively what the matlab command line options were (i.e. if - nodesktop or -nodisplay were used)? I have a system call that outputs colored strings (from bash) that look nice when run from a terminal, but don't translate to the matlab desktop, where I'd like to strip them out. thanks, Bill
From: Alan B on 10 Jun 2010 15:20 bcomisky <bcomisky(a)gmail.com> wrote in message <77b4a2b0-64fb-4c3f-8059-7752db06a254(a)u26g2000yqu.googlegroups.com>... > Is there a way to determine if the matlab desktop is being used? Or > alternatively what the matlab command line options were (i.e. if - > nodesktop or -nodisplay were used)? > > I have a system call that outputs colored strings (from bash) that > look nice when run from a terminal, but don't translate to the matlab > desktop, where I'd like to strip them out. > > thanks, > Bill jf = get(gcf,'javaframe'); dt = get(jf,'desktop'); mf = get(dt,'mainframe'); At the Matlab desktop, mf is a java object. At the command line, it is empty. There is probably a better way, but this seems to work. RHEL5, R2006b.
From: Alan B on 10 Jun 2010 15:32 "Alan B" <monguin61REM(a)OVETHIS.yahoo.com> wrote in message <hurdtl$egb$1(a)fred.mathworks.com>... > bcomisky <bcomisky(a)gmail.com> wrote in message <77b4a2b0-64fb-4c3f-8059-7752db06a254(a)u26g2000yqu.googlegroups.com>... > > Is there a way to determine if the matlab desktop is being used? Or > > alternatively what the matlab command line options were (i.e. if - > > nodesktop or -nodisplay were used)? > > > > I have a system call that outputs colored strings (from bash) that > > look nice when run from a terminal, but don't translate to the matlab > > desktop, where I'd like to strip them out. > > > > thanks, > > Bill > > jf = get(gcf,'javaframe'); > dt = get(jf,'desktop'); > mf = get(dt,'mainframe'); > > At the Matlab desktop, mf is a java object. At the command line, it is empty. There is probably a better way, but this seems to work. RHEL5, R2006b. Same thing, one line: mf = com.mathworks.mde.desk.MLDesktop.getInstance.getMainFrame;
From: Steven Lord on 10 Jun 2010 15:40 "bcomisky" <bcomisky(a)gmail.com> wrote in message news:77b4a2b0-64fb-4c3f-8059-7752db06a254(a)u26g2000yqu.googlegroups.com... > Is there a way to determine if the matlab desktop is being used? Or > alternatively what the matlab command line options were (i.e. if - > nodesktop or -nodisplay were used)? > > I have a system call that outputs colored strings (from bash) that > look nice when run from a terminal, but don't translate to the matlab > desktop, where I'd like to strip them out. http://www.mathworks.com/access/helpdesk/help/techdoc/ref/usejava.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: bcomisky on 10 Jun 2010 17:04 On Jun 10, 3:40 pm, "Steven Lord" <sl...(a)mathworks.com> wrote: > "bcomisky" <bcomi...(a)gmail.com> wrote in message > > news:77b4a2b0-64fb-4c3f-8059-7752db06a254(a)u26g2000yqu.googlegroups.com... > > > Is there a way to determine if the matlab desktop is being used? Or > > alternatively what the matlab command line options were (i.e. if - > > nodesktop or -nodisplay were used)? > > > I have a system call that outputs colored strings (from bash) that > > look nice when run from a terminal, but don't translate to the matlab > > desktop, where I'd like to strip them out. > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/usejava.html > usejava('desktop') is perfect, thanks!
|
Pages: 1 Prev: Creating a structure of arbitary depth from a cell array of Next: Am I inside a TRY statement? |