views:

709

answers:

12

How have you tweaked the MATLAB environment to better suit your needs? One tweak per answer.

+2  A: 

I set the number of lines in the command window scroll buffer to the maximum (25,000). This doesn't seem to noticeably affect performance and allows me to display a large amount of data/results.

b3
+4  A: 

I changed the default font in the MATLAB editor to 10 point ProFont (which can be obtained here) so I could write code for long periods of time without giving myself a headache from straining my eyes.

+2  A: 

I set the Command Window output numeric format to long g.

b3
A: 

I keep a diary for each session (possibly multiple diary files per day) to recall all commands executed. This is controlled by a startup.m file that checks for previous diary files from that day.

Scottie T
+1  A: 

I wrote a small function called fig.m to call up figure windows with names rather than numbers and display the name in the status bar.

Funnily enough, there are two or three identically named files that do exactly the same thing on the file exchange.

Will Robertson
+6  A: 

I run "format compact" to remove all those frustrating blank lines spacing out my output. Oh so simple, but makes it so much nicer to me.

AlexC
+2  A: 

I run Matlab with the options -nodesktop -nojvm. That way it just sits in a terminal out of the way, and I can use my favourite text editor to my heart's content.

You do miss out of some killer features this way though.

Matt
you can add -nosplash to that to get rid of the annoying splash screen... in my bashrc I have:alias m='matlab -nodesktop -nojvm -nosplash'I really enjoy it.
devin
+1  A: 

I have functions to 1) save the current figure locations and sizes on the screen, and 2) and one to load such configuration. It's very useful e.g. when monitoring data-heavy simulations.

Fredriku73
+3  A: 

I implemented analogues of xlim and ylim: xlim_global([xmin xmax]) and ylim_global([ymin ymax]), which sets the axes' limits the same for every subplot in the figure.

Fredriku73
+2  A: 

I use a function idetitle() that can change the window title of the Matlab GUI itself. Useful in a development environment where I'm running several Matlab processes, possible on different branches of source code or model runs. Sometimes I'll put the PID in the window title to make it easy to find in Process Explorer for monitoring resource usage.

function idetitle(Title)
%IDETITLE Set Window title of the Matlab IDE
%
% Examples:
% idetitle('Matlab - Foo model')
% idetitle(sprintf('Matlab - some big model - #%d', feature('getpid')))

win = appwin();
if ~isempty(win)
    win.setTitle(Title);
end

function out = appwin()
%APPWIN Get main application window

wins = java.awt.Window.getOwnerlessWindows();
for i = 1:numel(wins)
    if isa(wins(i), 'com.mathworks.mde.desk.MLMainFrame')
        out = wins(i);
        return
    end
end

out = [];
Andrew Janke
+1  A: 

I invert colors to have a black backgroud, easier on the eyes.

(Alt+Shift+PrintScreen on Windows, you can configure away the huge icons)

Emilio M Bumachar
+1  A: 

I use a startup.m file (sits in the local MATLAB path) to make sure that I have the settings I want whenever I start up MATLAB. This includes such things as formatting the REPL and plot parameters.

temp2290