Wednesday, February 29, 2012

Installing MATLAB on Linux

Notes:
  1. These instructions have been tested for MATLAB R2011a on Lubuntu 11.10.
  2. For more details, refer to install_guide.pdf in MATLAB setup ISO/folder. You can get this file (and complete official MATLAB documentation) for free (just create a free MathWorks account) at:
I followed these steps to install MATLAB on Lubuntu Linux:
  1. Extract or mount the MATLAB ISO file. Let's assume that you extracted MATLAB ISO file to
    /home/user/matlab
  2. Change to the extracted directory and run:
    cd /home/user/matlab
    sudo ./install
  3. When I ran above command, I got this error message (and installer exited without completing the install):
    user@system:~/matlab$ sudo ./install 
    [sudo] password for user: 
    Preparing installation files ...
    Installing ...
    eval: 1: /tmp/mathworks_2463/java/jre/glnx86/jre/bin/java: Permission denied
    Finished
    user@system:~/matlab$
    MathWorks India has a solution page to this problem. It lists the cause of problem and a solution. But this solution is better (imho) and worked very well for me! All you need to do is run following command on terminal/console:
    • For Linux (32-bit):
      chmod ugo+x /home/user/matlab/java/jre/glnx86/jre/bin/java
    • For Linux (64-bit):
      chmod ugo+x /home/user/matlab/java/jre/glnxa64/jre/bin/java
    Google has loads of related stuff if you search for "matlab java Permission denied".
  4. Don't start MATLAB after installation. Run these commands on terminal [1]:
    mkdir ~/.matlab
    sudo chown -R ${USER}:${USER} ~/.matlab
  5. MATLAB got installed (by default) to /usr/local/MATLAB. To run matlab use:
    /usr/local/MATLAB/R2011a/bin/matlab
[1] http://thameera.wordpress.com/2010/10/21/installing-matlab-2008a-on-ubuntu-10-10/

Monday, February 27, 2012

Access remote shared space from PCManFM

Notes:
  • PCManFM uses SSHFS to connect to mount and interact with files and directories located on remote system.
  • Methods 1 and 2 (below) have been tested on PCManFM 0.9.9.

Method 1:
  1. Open PCManFM.
  2. Type following in address/location bar (and then press Enter/Return key):
    ssh://user@server/dir/to/mount 
    where user is your username on remote server, server is remote server's URL/IP and /dir/to/mount is a directory on remote system which you need to access (you need to have appropriate access privileges on the directory on remote server to be able to access it).
  3. Depending on your connection speed, a new window will open prompting you to "Enter password for ssh as user on server". Enter your password in the text box (and then press Enter/Return key again).
This will connect you to your remote shared space in PCManFM.

Method 2:
(Source: http://en.wikipedia.org/wiki/SSHFS) 
  1. Mount a remote SSHFS share using:
    sshfs user@server: /path/to/mount/point
    where user is your username on remote server, server is remote server's URL/IP and /path/to/mount/point is the mount point on your local system.
  2. Browse to mount point (specified in previous command) in PCManFM.
  3. To unmount from a remote SSHFS share:
    fusermount -u /path/to/mount/point
PS: Methods 1 and 2 (above) are same (in the context of approach they take to mount a remote SSHFS share).

      Sunday, February 19, 2012

      Error: USB device over current status detected

      A few days ago when I booted my system, I was stuck at POST screen with following error message:
      USB device over current status detected.
      00 USB mass storage devices found and configured. 
      I searched the internet (on another system) and found out few solutions but nothing could solve my problem. Then luckily, I looked at my front panel USB port on my computer cabinet and found out that someone (not me!) had mistakenly inserted 3.5mm TRS plug into USB female. I removed it, then rebooted my system and everything was back to normal.

      Friday, February 17, 2012

      Key points in Professor Thrun's "Higher Education 2.0" talk at DLD 2012

      This is an excerpt from Professor Sebastian Thrun's talk at DLD 2012 titled "Higher Education 2.0". He announced Udacity in the same conference. The complete video of his talk is available on youtube (If you have ~22 minutes to spare, go watch it. This excerpt is nothing when compared with his talk).


      "...So, we scrambled. We put together a small technology team. We built a really ugly website. And, we started recording ourselves day and night. And just to show you how primitive our technology was, there was literally a camera, a pen and a webcam...

      We decided to flip the entire way we teach. Rather than lecturing students, we decided to quiz students... The principle way of engaging is that the student has to think. We are doing this to empower the student to learn which is fundamentally different from the way the lectures take place in universities today... And, we recorded this day and night at the expense of my family life, my sleep; one class took me about maybe 10 to 15 hours to record. And, then something bizarre happened. I was teaching the same class at Stanford to 200 students. On day 1, we had this full class of 200 students. And just 2 or 3 weeks in, class was empty. There were only 30 students showing up. So, I asked the students: "What's happening? Why are you not coming to class?". And they all said: "We actually prefer you on video"... You got to think about this. These are students who pay 30000 dollars a year at Stanford University to see the best and most famous of all professors. And, they prefer some video. That was a big shock to us.

      ...Here's my favourite critical email. Here is the very short sentence that moved me. The complaint is that this is a "weeder" class...the class is setup in a way that doesn't motivate but puts really harsh materials in front of students. And, tests them whether they can do it...[This email] was absolutely true. ...in my 20 years of teaching, at Carnegie-Melon, at Stanford, I'd always been a tough teacher. I'd always given students really hard question, I'd always let them fail, and would come to their rescue, making myself look really smart. Here was no purpose of weeding. This was an open university, there was no reason to reduce class size, there was no certificate to be earned; and here I was teaching a weeder class". Then I started to realize that we really set up our students not for success but for failure. We really empower professors by looking smart, and we don't really help the students to become smart. And this was just one example of a person who was dropping out, because I was the smart-ass who didn't help her.

      I started realizing that grades are the failure of the education system.

      Giving somebody three, or four, ... just means that really educators failed to get them to A+ level. So rather than grading students, with grades, as I'd done in the beginning of the class, my task had to be to make students successful, to get everybody to an A+ level. So it couldn't be about harsh questions and difficult questions, where they had one chance, and when they got it wrong they got a C, we changed the entire system to make it so that the questions were still hard, we gave more assistance, we let them take it multiple times, when they finally got them right they would get an A+ and I think it was much better for that.

      That really made me think about the education system as a whole.

      Salman Khan (of Khan Academy) has this wonderful story: when you learn to ride a bicycle, and that's quoting from his talk, and you fail to learn a bicycle, then you don't stop learning a bicycle, give the person a D, and move on to a unicycle. You keep training them as long as it takes to ride a bicycle, and then they can ride a bicycle.

      Our classes today, in math for example, when someone fails, we don't take the time or the needs  to make the student a strong student, we give them a C or a D or an F, then we move to the next class, and now they're already brain-marked as losers, they miss the necessary skills and knowledge, and they're set up for failure.

      This medium has the opportunity to fundamentally change all of this.

      ... Maybe we should rethink education. Universities were invented in 1088, about a thousand years ago.... The lectures were the most effective way to convey information. ...[we had the invention] of digital media. And, miraculously, professors today teach exactly the same way they taught 100 years ago. University has been the most suprisingly the least innovative of all places in society. Perhaps we should reconsider and think about new media, for teaching, that can personalise themselves and helps us to become effective."


      PS: I plan to annotate this post except that I don't know when it'll happen. In the meantime, bolded text in above quoted text will further highlight some points that are worth noting.