Octave reads CSV into a single Row

Reading a CSV into Octave is fairly simple. You can use the following command to specify the filename, separator and the array to load the data into. Just make sure you don’t have any headers in the file otherwise Octave will create a row of zeros instead.

data = dlmread(“test.csv”, “,”);

But if you find that Octave is reading everything into a single row which is filled with gibberish, it’s probably an issue with the end of line (EOL) encoding. In my case, the CSV was encoded with a Mac EOL. Octave is comfortable only with Windows or Linux EOLs.

Converting is fairly easy. Open Notepad++ and select Edit->EOL Conversion->Windows Format or UNIX Format. That will fix the problem.


Setting up a website in home directory instead of /var/www

I have an Apache web server set up with cakephp as the framework on Ubuntu. But I got bugged very quickly at having to sudo to edit every file since they were placed in /var/www. Besides, it didn’t strike me as the right thing to do.

So, a quick google on “/var/www on ubuntu” took me to this page which turned out to be exactly what I was looking for. You can set it up so that http://localhost points to a folder in your home directory (/home/user/public_html). Now I can edit all files without sudo and it works with http://localhost.

Ubuntu Jaunty: Error authenticating packages partial upgrade

Was getting this error when trying to do a partial upgrade in Ubuntu (I didn’t select ‘Partial Upgrade’, it brought it up on its own). Then checked in Synaptic->Repositories->Authentication. Apparently, http://ppa.launchpad.net jaunty was not authenticated.

A quick google brought me to this post. Looks like I’m not the only one with this problem. I followed the instructions left by one of the users and that fixed the authentication problem.

Then tried running the Partial upgrade again and it worked!

Acer 4530 and Ubuntu 9.04 – Perfect!

It’s here ladies and gentlemen … the perfect match. Ubuntu 9.04 appears to be well and truly tailor made for Acer 4530. Absolutely everything works. I’ve got the wifi working, sound playing, nvidia graphics working seamlessly with compiz-fusion.

The best part is, it’s working off a windows NTFS partition with write access to all the NTFS partitions, thanks to Wubi! And the entire installation took a little over 5 minutes. That’s even less than what it would have taken if I had installed a full blown Ubuntu installation.

My biggest concern was about the Atheros wifi card which has always been a problem in Linux because of the bad drivers. But Ubuntu 9.04 works out of the box. My laptop uses the ath9k kernel driver which is working great.

I feel everyone should give this a shot, windows users included. I’ve been dying to get rid of the vista home premium that came bundled with my laptop and along comes ubuntu 9.04 with it’s amazing compatibility. I’ve been a die-hard gentoo user for the past 5 years and now seeing how convenient ubuntu is, I finally feel Linux has arrived!


Ok, here’re some more details:

This is my laptop: Acer 4530-6823 which has AMD Athlon XP 64bit QL-62 processor. I’m using the 32bit version of Jaunty and the default Gnome desktop.

Of course, I would say that this distro, although miles ahead of the others, isn’t without some bugs. The audio port for headphones/speakers doesn’t work out of the box. Neither does the built in mic. But I think this can be fixed by updating/configuring alsa.

But the webcam works fine. I’ve tried it with Ekiga and it’s working.

I did try installing Ubuntu 8.10 on my friend’s Acer 4530 which was identical except for the memory and HDD and I gave up after spending a miserable few hours struggling with it. Same was the case with Suse. But the ease with which I could get Ubuntu 9.04 up and running is amazing. If you’ve got this laptop, I would highly recommend this version. Also, if your laptop has got an atheros wifi card. This is the first Linux distro I’ve seen which has got it working out of the box (I couldn’t get it to work in any of the others even after struggling with them – Ubuntu 8.10, OpenSuse 11.1, Gentoo!).


Ok, got the headphones working. Followed the instructions in the post given by Asif over here:


KDE and QT

Have always been a linux user. But just recently felt the need to contribute to the open source community as well. Being primarily a java developer, C++ doesn’t come very naturally to me. But I’m willing to learn and am going through it one step at a time.

I did find the following tut for C++ for Java devs:


But for now, I’ve installed KDevelop and going through the following tut I found on the dev site for kde:



KDE effectively uses QT libs from Trolltech.