Skip to main content

Posts

Showing posts from May, 2008

Executing Matlab from command line

Passing an argument from command line to Matlab script can be tricky because There are two solutions I can think of right now: Set the environment variables before starting Matlab Using BASH shell, one may set the environment variable using the command: a=1;b=2 Start Matlab using the command: matlab -nojvm -nosplash Inside matlab script one can get those variables using the command: a=getenv(a); b=getenv(b). Using the argument "-r" matlab -nojvm -nosplash -r "a=1;b=2; aScriptName;"

Celtics close out Cavaliers in Game 7

Boston won I am a Celtic fan, mainly due to Kevin Garnett. Many of the game recaps on Celtics and Cavaliers game 7 can be read online. Here, I am just going to point out two highlights of the game. First, the game was nearly turned on one play, as James stole the ball from Pierce and raced down the court for a dunk that cut the deficit to 89-88 with 2:20 to play. Next, James missed a 3-pointer, and P. J. Brown hit a 20-footer to give Boston a 3-point edge with 1:21 left. In the next cavaliers' possessions, it was 88-91, James could have taken another 3-point instead he passed to his fellow teammates, and the rest is history. If that one went in then the series will be different today. Second, Lebron James is indeed a winner but he has to remembered that Pierce waited nine years for Kevin Garnett and Ray Allen to arrive. Similarly, Kobe Bryant can play with Paul Gasol only this year. Anyway, Pistons and Celtic are in Eastern Conference Final 2008. This conference final is Pistons...

LaTeX command for writting a matrix

One can use either array environment or matrix environment provided by amsmath package for writting a matrix in LaTeX. The main difference is that the array environment can hold as many columns as you want, but matrix environment can hold at most 10 columns. Depending on what kind of delimiters you want, the amsmath package provides 5 matrix environments, i.e. for pmatrix (parentheses), bmatrix (square brackets), Bmatrix (curly braces), vmatrix (vertical brackets), and Vmatrix (double vertical braces).

Installing and using Emacs, AUCTeX, RefTeX, preview-latex

Typing Latex in Emacs is easier with the help of AUCTeX, RefTeX and preview-latex Installation of AUCTex, RefTex and preview-latex Using Most commonly used command: C-c ( ; it is used to label an object. C-c ) ; it is used to reference an object. C-c [ RET keyword; it is used to find the reference \cite C-c = to explore table of content C-c C-p C-d; it is used to turn on preview-latex C-c C-p C-c C-d; it is used to turn off preview-latex

Installing Ubuntu 8.04 (Hardy Heron)

I have done clean install on Ubuntu 8.04. The bug I have encountered so far are as follows: Rythmbox crashes when musics are played, the solution found is to disable all of the plug-in. Firefox-3 is not stable yet, so uninstall it and move ~/.mozilla into ~/_mozilla as a backup. Personalized bookmark is located in ~/.mozilla/firefox/*.default/bookmarks.html. Then install firefox-2. Good luck !!!