Matlab from the Ubuntu Menu

Getting stuff to work from the Ubuntu Menu is pretty straightforward, but I ran into some little problems that confused me with Matlab. This post goes through the steps and difficulties I had, which might be useful in general, not just in relation to Matlab.

First up, I installed the Student Edition of Matlab (currently R2009a and a steal at the student price), taking into account the fact that I’m running a 64-bit OS and the student edition doesn’t come with the 64-bit architecture libraries. Pretty confusing on first install as the installer detects the architecture but then can’t find the libs, but corrected using this guidance on the Mathworks website.

Once you’ve done that, you need to pass the argument ‘-glnx86′ to Matlab every time you start it up.

That’s a pain, plus the other boilerplate to run it in the background – so I tried to set up a menu option using ‘Main Menu’, which is the relevant administrative tool that comes with Ubuntu. It’s in System – Preferences – Main Menu if you’ve not used it before. Here’s a screenshot of it, set up with a Matlab launcher.


Main Menu with Matlab

The obvious thing is to give Main Menu the command that works from the command prompt, but no. Doing this results is strange behaviour where the splash screen fires up, disappears, and nothing. Checking the .xsession-errors log file in my home directory shows what’s happening. The application is launching in command line mode, writing its prompt to stdout, and then being shut down.

Kinda weird, maybe, as launching the app from the command line launches the Matlab GUI. Anyway, you also need to also add a ‘-desktop’ argument to the launcher command. My Matlab is installed in /opt/matlab, remember to change the path as appropriate for you.


The Matlab Launcher

You can also add the icon if you want by clicking where the Matlab icon is shown above, browsing to wherever you installed Matlab then into the ‘X11/icons’ directory, where you’ll find a number of icons.

Now you can launch the program from Main Menu, or drag-dropping it onto a panel, onto your desktop – wherever you like.

Induction Week 2009

Before each academic year, there’s ‘Induction Week’, where alongside the orientation stuff going on for the new students, the academics running the courses sell their wares to the students who’ve signed up to do an MSc. There’s a choice of 25-odd courses which seem to cluster around formal methods, artificial intelligence, high performance computing and the semantic web.

This year, I’ve saved up a few days’ holiday to let me attend the Wednesday and Thursday, when the course talks are going on. It also lets me sort out library books, admin stuff and the like. The 05:45 starts to get to Manchester on time are painful, mind.

I’ve transferred most of the introductory talks I was interested in seeing to my Google Calendar, so that I had my agenda for the day on my phone. That saved me potentially missing anything I wanted to see without me having to sit in the same room all day. In theory anyone who’s interested in what’s going on should be able to view my MSc calendar here. I haven’t tried to give out links to a personal public Google calendar before though, so let me know if you want to look and it doesn’t work.

It certainly felt very different this year from last. Knowing where everything is and seeing a few friendly faces makes everything much easier and more comfortable.

As for the courses, I confirmed what I want to study this year, so it’s time to get stuck into maths and Matlab ready for Machine Learning, which starts on Tuesday.

Astrid – Task Manager for Android

I’ve been using Astrid, a nice little free app on the Market that lets you set up tasks with deadlines and then notifies you when they’re due. I mentioned it on my HTC Magic review, but a few weeks on and I’m still using it. In fact, I’m really starting to appreciate it.

It’s a pretty simple idea that I’ve tried before using other platforms (desktop, Symbian phones) without much success. It’s working much better for me on my Magic, which I put down to the functionality beating other phones I’ve owned and the portability beating the desktop apps.

The keyboard and simple setup of tasks and repeats means that it’s really no problem for me to pop stuff I need to remember into there as-and-when I think of it. If it goes in the phone, I remember it. Simple. Just…got…to…be…disciplined…

It syncs up with rememberthemilk.com so you don’t lose all your stuff if you lose your phone, and you can get to your stuff from the web.

In use it’s transparent until it needs to tell me something, at which point I get a buzz and a little notification appearing in the notifications bar. Drag it down and I can see the tasks I need to do. Once there’s a few tasks in there, that notifications window fills up quick if you don’t stay on top of things – although that does kind of compel me either not to put things off, or to think about how long I’m putting something off for.

From a notification, you can open the task and complete it, snooze it or edit it. If you complete it and it’s due to repeat, it gets notified when it is next due.

Irritations: there isn’t a button to complete a task straight from the notification – which is what I do most often. It can also be a little slow, but that criticism could be levelled at most apps depending on how busy the phone is, so it’s probably not actually to do with Astrid. More annoying is the delay whilst it syncs up with rememberthemilk – it makes you wait, instead of just doing it in the background.

That said though, overall it’s a big plus. It’s a nice feeling to drop a task in there and know that you’ll get reminded when it’s due. It’s a really nice feeling when you get reminded of some silly little thing that there’s no way you would have remembered otherwise!

When a minus times a minus equals a plus

We all know from school that multiplying two negative numbers together gives a positive number, but can you think of a common-sense example of this rule in action that would convince someone who asked why?

I got asked why recently and I couldn’t.

Neither could anyone I asked. Plenty of examples involving mirrors and vectors etc. but nothing that didn’t sound rather like illusion and trickery. Nothing convincing.

So – after some thought, here’s an example that convinced the person who asked me. (Well, they say they’re convinced-ish, but I think that’s about as good as it’s going to get!)

This example is about getting two everyday, dependent variables that we can set a zero point on both and thus deal with the positive and negative values in both. Imagine I have a big bucket of sweets, and I have been giving you ten sweets a month for years.

How many more or less sweets do you have, six months from now?

Intuitively, you have 60 more sweets, and we can calculate that because you get +10 sweets/month and we want to know how many you have in 6 months;

10 x 6 = 60. (plus x plus = plus)

How about me? How many more or less sweets do I have, six months from now?

We know that I have 60 sweets less, because you have 60 sweets more. We can calculate this because I get -10 sweets/month;

-10 x 6 = -60. (minus x plus = minus)

That’s the easy ones done.

How many more or less sweets did you have, six months ago?

It should be easy to convince that if you have 60 sweets more in six months’ time, then you had 60 sweets less six months ago. We can calculate it using the same 10 sweets/month, but -6 months to go back in time.

10 x -6 = -60 (plus x minus = minus)

Finally, how many more or less sweets did I have, 6 months ago?

I still get -10 sweetsmonth. Just because we’re considering the past, you don’t start giving them to me or anything. In the case above, we used -6 to represent ‘six months ago’. So…

-10 x -6 = +60 (minus x minus = plus)

Which gives us the intuitively correct answer, that if I give you 10 sweets a month then I had 60 more sweets, six months ago.

It’s a tough one to argue with, because the answers are pretty obvious. Do you have a better way to explain why minus times minus equals a plus?

Eigenvalues and Eigenvectors

Yeah, exactly. Eigen-whats?

Welcome to the primer material for the Machine Learning module. It  looks pretty mathsy, specifically Linear Algebra (think matrix algebra and Eigen-dooflabs), Differentiation and Integration and some probability and information theory.

Yeah, it looks tough. But I’m intrigued, too. Studying the material, I can’t wait to find out how these things actually apply to machine learning. Something inside my head that romantically pursues elegance in this stuff is thinking of some analogy of resonance and harmonics – but applied to learning algorithms. Probably way off base, but hey. Soon I will be highly learned in these things.

The tutors actually have a dedicated website for the course here, which is where all the primer material, previous years’ notes and past exam papers can be found. It looks like a great resource for prospective sudents like myself, so hats off to the tutors on this one.

The Joy of Podcasts

Since I won an Apple iPod thing in a raffle last year, I’ve discovered the joy of podcasts.

It’s not the jump-up-and-down-singing kind of joy you might get if you thought you were out of beer and then found an ice-cold bottle of amber nectar behind a melon at the back of the fridge, but it’s not bad for free.

It’s good enough that these days I forgoe the tram in favour of enjoying a 50-minute walk to and then from work (much to my better half’s bewilderment at the apparent insanity of it) so that I can catch up with my listening.

Sharing what I listen to and why I like it’ll make good blog fodder, I figured – and make me have a look around and what’s new and out there that I’ve missed so far. Rather than write a loooong post on all the podcasts I listen to, I’m just going to give a quick review of the one that is probably the one I look forward to most right now, and follow up with others later.

So my pick of the day is… drum roll…

PRI’s The World: Technology

The WebsiteThe Feed

Clark Boyd produces a compelling weekly show clocking in around the 30-minute mark each week.

What’s Good

Mix leaning towards technology, but with regular diversions into other relevant subjects – last year there was a great story about the challenges in delivering AIDS drugs to where they’re needed in Africa.

The technology stories often consider political and social implications, making this a more rounded podcast than most I listen to.

Always great sound quality and clean production.

There are regular features, and Clark’s delivery reminds of a good radio show.

What’s Not So Good

Can’t fault it. Definitely one of my favourites.

Getting ready for 2009-10

According to Manchester’s online timetables, my MSc course starts again in the week commencing 28 September.

This year, I’m much better organised. There’s no messing about with my University application, I know where the online resources are, I’ve done the journey a dozen times now and I have a much better idea of what I’m up against.

I’m hoping to be heading over to Manchester on the 23rd and 24th September to attend the last couple of days of Induction Week. This is when the lecturers running the MSc courses present on their courses and when I need to decide what I’m going to study this year.

Right now, I’m looking seriously at:

Machine Learning

Patterns for e-Business Applications

Building Web Applications

I’m looking forward to getting started and this time round I’ve been saving up my holidays at work so that I can take a couple of weeks off whilst I get into Induction Week and the first module of the year.

I’ll show my age and quote Whitesnake – “Here I go again”