31 January 2006

Keeping a log of software commands

In scientific labs, it is well known that you keep a lab notebook detailing the steps and procedures you use to obtain results.

I found that this is also a good idea when you use many different software packages. For instance, I often change the appearance of MATLAB plots. But I also forget the procedure just as often.

So I keep a text file where I jot down all the different commands I've found useful in various programs. Here's the MATLAB part of my text file:
MATLAB
------
format long - print numbers in long format
matlab -nodesktop - runs MATLAB in non-buggy command line mode
help strfun - displays info about string functions
warning off - turns off warning messages

MATLAB debugger
---------------
dbcont - execute until next breakpoint
dbstop - execute current line of .m file
- see current value of variable_name
dbquit - quit debugger

How to alter graphics handle properties
---------------------------------------
H = plot(...)
H = legend(...)
set(H, 'parameter', parameter_value)
set(gca, 'parameter', paramater_value)

example:
h = findobj(gca, 'Type', 'line');
set(h, 'LineWidth', 4, 'FontSize', 15);
set(gca, 'Linewidth', 4)

No comments:

Post a Comment