Friday, November 30, 2012

Making "journal quality" graphs in Matlab

A very nice blog on making journal quality graphs by extensively using handles at Loren and the Art of Matlab.

As a side note, the actual blog entry was written by guest blogger Jiro Doke, who I went to school with, as mentioned earlier.

Monday, November 26, 2012

Rainbows are beautiful!

After seeing this lecture, I will never see a rainbow with the same eyes:

Wednesday, November 21, 2012

Kling on Online Education

I recently listened to a podcast of an engaging interview with Arnold Kling at EconTalk. The interview starts off from an article Kling wrote earlier in the American. He starts off the article provocatively:
Education is in some respects one of the most stagnant of all major industries. A farmer from 150 years ago would not comprehend a modern farm. A factory worker from 150 years ago would not be able to function in a modern factory. But a professor from 150 years ago could walk into a classroom today and go to work without missing a beat.
At this point you are probably thinking, "this guy sounds like yet another of those guys who thinks online education and the private sector are going to supplant traditional universities." Perhaps, but not quite.

In the article, Kling then argues why MOOCs (massive open online courses) are mostly just hype. Most (about 90%) of the "tens of thousands" of students who take them, give up very early.

We should not be surprised that MOOCs do not benefit most of those who try them. Students differ in their cognitive abilities and learning styles. Even within a relatively homogenous school, you will see students put into separate tracks. If we do not teach the same course to students in a single high school, why would we expect one teaching style to fit all in an unsorted population of tens of thousands? 
An online course that has been designed at Stanford is likely to best fit the students who are suited to that particular university. The other beneficiaries are likely to be students who have the right cognitive skills and learning style but happen to be unable to attend college in the United States.
And perhaps a key insight:
The attempt to achieve large scale in college courses is misguided. Instead of trying to come up with a way to extend the same course to tens of thousands of students, educators should be asking the opposite question: How would I teach if I only had one student? Educators with just one student in their class would not teach by lecturing.
 Interesting perspective - even if you don't agree with all of it.

Thursday, November 15, 2012

Exporting Matrices in Octave/Matlab to LaTeX format

I often need to include vectors or matrices computed during GNU Octave sessions in my lectures or presentations. Here is a quick program called matrixTeX.m (stored on Google Drive) that takes in a matrix A and spits out the matrix form in LaTeX.

In the simplest form, matrixTeX(A), it simply takes in a matrix  A, checks whether the elements are integers or floats, and prints out to the screen in the appropriate format using the amsmath matrix environment bmatrix.

If you'd like the elements of the matrix displayed in a particular format, you can optionally use a second input argument to specify a C-style formatting string: e.g: matrixTeX(A, '%10.4e'), or matrixTeX(A, '%d').
In addition, you can also specify a third argument to specify alignment of columns as or matrixTeX(A, '%d','r'), where the 'r'  stands for right alignment. This option uses the bmatrix* environment provided by the mathtools package, which needs to be included in the LaTeX preamble.

Thursday, November 8, 2012

Is consistency overrated?

Jeff Bezos thinks so:
... he shared an enlightened observation about people who are “right a lot”.
He said people who were right a lot of the time were people who often changed their minds. He doesn’t think consistency of thought is a particularly positive trait. It’s perfectly healthy — encouraged, even — to have an idea tomorrow that contradicted your idea today.
He’s observed that the smartest people are constantly revising their understanding, reconsidering a problem they thought they’d already solved. They’re open to new points of view, new information, new ideas, contradictions, and challenges to their own way of thinking.
It reminds me of Keynes': "When the facts change, I change my mind. What do you do sir?"