How can I draw a MATLAB figure in a minimized Windows RDP session? - matlab

I have a script that generates a slew of figures for a manuscript. It crawls through a directory, loads in some data files, performs some calculations, formats the results into some figures and then outputs the figures to png and/or pdf files for inclusion into my manuscript using export_fig.
My problem is that the "performs some calculations" part is slow, and my directory to crawl through is reasonably sized. I would like to run the script on another machine so I can be getting other work done on my regular desktop machine. However, when I remote desktop into the other machine (between two Windows 7 Enterprise machines), as soon as I set things to run and minimize the RDP window, MATLAB throws the following error:
Error using drawnow
UIJ_AreThereWindowShowsPending - timeout waiting for window to show up
Clearly, the fact that there is no window for MATLAB to draw to is causing it problems. However, I have run this script overnight before, where the lock screen takes over, and not had a problem.
My question is, is there a way to tell MATLAB to draw the figure even if the display is a minimized RDP window, or do I have to physically log onto the computer to generate the figures?

Related

MATLAB 2013a/b: stops responding when using UI for opening files during script execution

I've experienced under various setups that MATLAB stops responding when you try to open a file during script execution. Usually I'd just promptly kill MATLAB and start whatever I was doing before. However, now I'm working on a remote machine with a buggy OS interface that basically won't let me kill MATLAB. As the whole MATALB interface doesn't respond, I can't CTRL+C.
Is this a known issue and is there a workaround?

Script to open two applications on start up and snap them with one being 80% screen and the other being 20% in Windows 8.1 Desktop

I am not a programmer rather a designer but have been trying to write a .bat file for weeks to have two applications, which I specify, open automatically and snap to a scale of 80% left hand side and 20% for the second app on the right hand side. I have looked into multiple options without having any luck. Currently, I can create a script to open two files and automate key strokes to have them snap 50-50%, however I really need the 80-20% screen real estate. Any chance anyone would be able to help me out?
I am currently trying to use PowerShell with WASP (http://wasp.codeplex.com/) but scripting in this is beyond my knowledge. Many thanks!
You should try UI Automation PowerShell Extensions.
It supports testing for Metro Apps. The initial setup is a bit tedious (as described in the link provided) but it is well worth it. You have a UI action recording tool UIAutomationSpy which records all of your actions and generates corresponding PowerShell scripts. You can then run these scripts using the UIARunner tool.
With respect to the current problem, you could simulate the steps for snapping the apps using the recorder. You could then create a task which runs a batch file (executing the concerned script) on startup.

Opening multiple GUI windows in MATLAB at the same time?

I am very new to MATLAB so this might be quite obvious, but I can't find a solution. I am using a MATLAB toolbox called MatCont. When opening the GUI provided by this toolbox, multiple windows open. Everytime I switch to another window (say - my browser), I have to reopen these GUI windows one by one.
Is there any way to get MATLAB to associate these windows into one configuration and make it easy to open the GUI in one click?
Two rather obvious possibilities spring to mind:
Dock the windows within Matlab itself. When you want to switch back to your Matlab session and view the toolbox windows, all you need to do is switch back to Matlab.
Just minimize the browser window to the taskbar. The windows opened by your Matlab session should then return to the foreground.
In addition, since this kind of question is very much system dependent, it might help if you'd specify precisely what operating system and/or window manager you're using.

How to change Matlab settings (for history.m) in terminal?

I am using Matlab on a remote server from my MacBook. Partly because I find the Matlab GUI clunky under X11, I use it in the terminal window (by running matlab -nodesktop). This has been working fine, until I now needed to copy some stuff from the command history.
It seems like history.m is only being saved on exit, even though when I check the settings in the GUI, it says that it is being saved for each command. It also seems like exit statements are included in history.m when Matlab is run from terminal, but not in the GUI, so it seems like the settings in the GUI don't apply there. I cannot find anything in the Matlab help pages on how to change the settings for the terminal window.
I need to access the command history for my session while it is still open. Does anybody have an idea about how I can do this -- short of starting to use the GUI?
You might try the diary function. It logs both commands and their (text based) results to a file. On my system (Mac OSX with MATLAB R2011b), the output does not show up in the diary file immediately, but it does update when you turn off the diary. Which you can do repeatedly if you need without exiting matlab.

Xming and picture rendering in Matlab

I'm using xming 6.9.0.31 on Windows XP computer to connect to Linux server and run Matlab scripts there. I have 2 configurations of xming and both have problems related to matlab output figures.
In one configuration everything works on the first script run, all figures come fine. But on the second run (of the same script) xming crashes when it outputs some figures. It might work longer if i create figures in command line, but eventually it will crash anyway, on the process of outputting new figure.
In another configuration (borrowed from andLinux installation) xming doesn't crash and is able to output figures, but only simple plots, if there is something more complicated, with a lot of data, just figure frame appears with whatever was under the figure window. The same thing happens if i actually run andLinux and connect to Matlab from there.
Seems that this is somehow related to memory. Are there any options for xming which are related to used memory? As far as i understand it'a only showing the image which was created on the server side?
If the issue is related to OpenGl setting another renderer might help.
set(gcf,'Renderer','Zbuffer')