colors are important if you want your MATLAB plots to be aesthetically pleasing. which you should. because it makes life more enjoyable. i mean, see how the colors of the header image and the titles and links sort of match each other on this page, that is NOT by accident. and it pleases me.
another advantage of specifying your own colors is that you can make a bunch of personal colors that
this command reminds me of jay-z's song on to the next one.
continue: passes control to the next iteration of a for or while loop.
if [something that makes you want to skip the rest of the iteration go to the next one]
continue;
end
There are lots of figure properties, including one i use to specify the size of screen figure output and also .jpg or .eps size. this is helpful if you care about the aspect ratio of your output, which you should.
figurehandle = figure('position', [x1 y1 x2 y2], 'PaperPositionMode', 'auto');
i usually start from the bottom left corner of the screen (x1 = 0, y1 = 0) with units in pixels. The '
a very simple command to make a timestamp:
>> datestr(now)
ans =
18-Jan-2010 15:31:58
i like to write this string to my output files, especially if it is a file that i append to. then if you change something in the program on some date, you can look at lines before that date to see the difference. (or, if you make 11 versions of the same dumb program, you can always look at the output file and
it's the year 2010 and i finally figured out the fit.m function. why is this awesome? because it takes the place of the tedious excel fits i've used for over a decade. how many hours of my life have i spent clicking the chart button, scatter plot button, fit trendline, power fit, show equation, show R^2? very inefficient! so here is a way that i like much better*:
x and y are your vectors