File Exchange Pick of the Week

April 4th, 2008

HTML calendar generator

You may have noticed some recent changes in the format of this blog. Here’s what to expect on a regular basis – two topics per week.

  • On Tuesdays Doug will provide MATLAB tutorials.
  • On Fridays guest bloggers Jiro, Brett and Bob will highlight File Exchange submissions.

Bob's pick this week is HTML calendar generator by Tobin Driscoll.

The screen shot above doesn't do an HTML calendar justice. Click here to see an HTML example. Among other things it autoscales to fit the width of your browser window. You may also notice that Saturday and Sunday are not displayed. That's a clue to how Tobin uses this tool. From his description "When I teach matlab-intensive courses, I post a calendar on the class web page and create a link for each date to a matlab diary (or published output) of that day." His students get weekends off, and Tobin gets extra credit for providing links to MATLAB content.

MATLAB may have started as a humble tool for learning matrix arithmetic and solving linear algebra problems. For nearly a quarter century MATLAB has grown more powerful and broadly useful. As a dyed-in-the-wool[1] MATLAB geek I just love to see creative and innovative uses like this. Tell us about yours.


Get the MATLAB code

Published with MATLAB® 7.6

One Response to “HTML calendar generator”

  1. Tom replied on :

    This is a very interesting and impressive code. I have learned much from studying it.

    There is a minor bug that leads to 2 January’s of 2007 and none for 2008, for example. It comes from line 80:

    Year = y0 + floor(m/13);

    One fix might be:

    Year = y0 + (m-Month)/12;

    Anyway, great app!

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Zach: Hi Doug and Les, I didn’t have a lot of time to mess with this, but I did find a work-around. I plotted...
  • hamed: k
  • Les: @Zach This isn’t exactly what you are looking for but at least it puts all three parameters on the same...
  • Zach: Thanks for your suggestions Doug. I’ll give that a shot and see what happens. I’ve seen many of...
  • Doug: @Zach, I would say to use plotYYY, because that is close to what you want, but using depth as Y makes sense....
  • Doug: @Teja, I think this will work: http://www.mathworks .com/access/helpdesk /help/techdoc/ref...
  • Gify: merry christmas :) nice christmas tree! Regards, Janet Gify
  • Teja: Dear Doug Is there anyway to plot a surface from nonuniform data without meshgrid and griddata? Basically i...
  • Zach: I’m working with geophysical data, so I’d like to produce a depth profile. The y-axis would be...
  • Doug: @Ashok First, please do not use variable names that are MATLAB commands (std and mean). Second, p(j) should be...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.