Wednesday, February 07, 2007

Chateau de Pierrefonds Update

As a follow-up to my earlier post, my mom just sent me this month's newsletter from France Monthly. It provides a nice history of the Castle of Pierrefonds and is worth the read.

Now that I know so much more about the castle, it would be nice to go back and see it.

Tuesday, January 02, 2007

Improving pcolor with hullfit

Hi everyone,

Found a great new function today.

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=6243

I was looking for something that could quickly make an outline from a mess of points, specifically a quick way to create a polygon shape to use with fill function to show the outline of a radial site's coverage area. Passing the complete array of locations results in a funky 80's Escher-like motif that's not at all pretty.

Anyway, as it turns out, the built-in "convhul" function does this, but it's goal is to minimize the circumference of the polygon whereas "hullfit" minimizes the polygon's area.

Why is this so noteworthy? Well, meshgrid and pcolor (among other functions) use convhul, and as we know they do a lousy job of showing data in areas that don't really exist. (That bend in NJ around Tuckerton is especially annoying, as is Sandy Hook since both tend to result in Codar data appearing on land.)

Well, the comments in "hullfit" showcases its true usefulness. I repeat some snippets from the simple example here...

xi=linspace(min(x),max(x),100);
yi=linspace(min(y),max(y),100);
zi=griddata(x,y,z,xi,yi');
k=hullfit(x,y,0.1);
[xx,yy]=meshgrid(xi,yi);
in=inpolygon(xx,yy,x(k),y(k));
zi(~in)=NaN;
pcolor(xi,yi,zi),shading interp

This far surpasses the alternative way I had developed a few months ago using the mapping toolbox's distance function and an arbitrary distance threshold between points.

And, better yet, I also (re)discovered another cool function called "inpolygon" which is sure to be of future use.

The year is already starting well. Enjoy!

Thursday, August 31, 2006

Using Data

In my real life, I spend a lot of time trying to figure out how people (particularly students) can use and understand, so called, "real-time data." Data analysis in any form is a vital skill. It's how people learn about the world. Whether studying the environment, business or social interactions, observations are reduced to data and then visualized and explained in such a way that attempts to make sense of underlying processes driving the world around us.

While this skill is essential, it's not well appreciated. Countless studies point to the need to improve students' graph reading capabilities. But reading a graph is only one part of understanding data, though it might be the easiest part to test. Only by understanding where data comes from, how graphs are made, and how one might assimilate multiple datasets together to find relationships, can a greater understanding prevail.

So how can we increase the data analysis capabilities of students, such that they understand its usefulness in their lives?

Of course there is no easy answer, but by using compelling datasets that 1) portray a fun and engaging story and 2) are relevant to students' lives and experiences, we can ensure they keep their interest in the data, and subsequently how one goes about visualizing data and understanding its underlying processes.

In oceanography, we use real-time data to entice students into learning about the ocean and issues that affect them.

But there are lots of other fun ways of presenting data, and this recent post from David Pogue on the changing patterns of Baby Names shows that even seemingly obscure topics are ripe for data analysis by students.

Have you seen a dataset or graph lately that has compelled you to think differently about a subject than you had before?

Friday, June 09, 2006

Matlab and Intel Macs

I just learned some great news. Apparently, those of us who have Intel Macs can in fact run Matlab on them.

The work-around goes like this.
1) Open X11 (you need it to display graphics)
2) Open Terminal (supposedly Matlab runs faster in Terminal, plus you have access to the scrollbars and the clipboard, which X11 doesn't play nice with).
3a) If you use bash, set your display by entering
export DISPLAY=:0.0

3b) If you use tcsh, set your display by entering
setenv DISPLAY :0.0

4) Start Matlab without the Java-based GUI
./Applications/MATLAB704/bin/matlab -nojvm

Of course, this means you won't have access to the fancy GUI, which I've grown accustomed to over the years, but there are some suggestions in the post above on how to configure a code editor (i.e. Textedit or emacs) to allow you to quickly open files from within Matlab. And if you want a full-fledged file manager, well there's always Finder which is easy to use.

Additionally, the forum post has some suggestions on how to place step 3 in your login file, and some neat commentary on running Matlab with Bootcamp or Parallels, not to mention the bleak outlook on when full Intel Mac support will be available.

Unfortunately, none of this helps me run Matlab at home, since I use a license manager at work that is blocked to the outside world. So now I have to decide if I want to spend $500 for a stand-alone license, or deal with a sluggish network connection, something I've avoided to date.

This reminds me of another tidbit. If you would like to automatically set your display when using ssh (you need to have X11 open first), simply use the -X flag as follows.
ssh -X user@myserver.edu

So, if you open X11 first, and then use Terminal to ssh and run Matlab on a a remote server, you'll have all the bells and whistles of graphics display and access to your local clipboard without much fuss. This is a heck of a lot easier than using setenv DISPLAY and trying to figure out your DHCP IP.

Your only worry now is to pray your bandwidth can keep up with the gigabytes of data you're try to process.

Thursday, May 25, 2006

Virtual Worlds

Recently, during a discussion on how technology is changing education, I was reminded of the virtual worlds people are setting up. In general, younger generations are growing up accustomed to the benefits of technology, and expect their entertainment to be equally exciting and innovative. Video games just don't cut it anymore. They have to be more interactive, more immersive and more communal. The internet provides a ripe infrastructure for these kinds of developments, taking games from single PC's to networks of users.

As testament to this trend, look no further than the recent release of Disney's Virtual Magic Kingdom (see this review at O'Reilly). It takes the virtual world game to the next level, and it's graphics are far superior too.

In fact, even ocean educators are already going this route. Woods Hole, among others, has partnered with the Whyville site to provide educational content amongst the games and interaction provided by the site.

To my mind, the jury is still out on the effectiveness of these sites. Supposedly, there's lots of evidence that students really get engaged in the community atmosphere of such sites. However, I really question how much they actually learn.

It's clear that students like to use (read: play on) them, spending much of their time designing their avatars and chatting with other users. And despite the best attempts of educators to spread educational content throughout the sites, often within the games that reward students with "money" to use to improve their avatars, I would wager they spend more time on the frills and less on the skills.

Of course, when Disney builds a free virtual environment, it's not about educational value, but marketing and branding.

But when educators start thinking about using new technologies to teach and excite the next generation, I feel we still have a long way to go before we find the right recipe.