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

2 Responses 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!

  2. name replied on :

    comment4,

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).


MathWorks

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

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