I run some code remotely on Matlab on Unix, which generates many graphs. I do not want hundreds of my shapes appearing on my local system. (And I suspect that the window slowdown process also slows down the execution of my code.) I read that setting the DISPLAY environment variable to null limits this behavior, and indeed,
$export DISPLAY= $matlab14a -nodisplay -nosplash >>X=1:10; >>Y=X.^2; >>plot(X,Y);
Immediately returns the cursor to the console and does not display a graph. However, I want to turn on the display again. I can run
>>setenv('DISPLAY',':1102') %Previous (correct) value of $DISPLAY >>getenv('DISPLAY') ans = :1102 >>plot(X,Y);
However, the plot still does not appear. I believe this is because my system routes the matlab instance through the qrsh scheduler and then another subshell. Therefore, when I change my DISPLAY variable, I believe that some shell does not have access to this variable. I do not know the exact details of this process.
My question is: how can I get Matlab to display graphs correctly as soon as I change the DISPLAY variable to the correct value? Alternatively, are there other solutions to switch the display of all graphs / numbers?
source share