eXTReMe Tracker
Nov 162011
 

On most Linux/Unix based systems, you can save your Matlab figure as a postscript instead of saving it as a png or jpg. One advantage of saving figures in this manner is that you can save multiple images as separate pages on that .ps document, whereas with png/jpg you have to save each image as a separate file.

To print the current image to postscript, all you need to run is:

print(‘-dpsc2′,’filename’);

To have multiple images appended within the postscript document, you need to use the -append switch.

print(‘-dpsc2′, ‘-append’, ‘filename’);

Your output postscript will have the name filename.ps

To convert the postscripts to pdf format, just run the ps2pdf command in the terminal window:

ps2fpdf filename.ps

The output of this would be filename.pdf

And you’re done.

Nov 102011
 

In order to install l1-SPIRiT Compressed Sensing Parallel MRI, we need to have a couple of programs installed – fftw3, lbz2.  Usually you encounter the following error while running build routine in Matlab.

/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status

sudo apt-get install libbz2-dev

After installing libbz2-dev this error is corrected.

Nov 092011
 

Some .avi files tend to have an out of sync audio track, some can’t be scrolled through (forward/reverse), while others might show an message that says the index file needs to be recreated.

Solution is to create a copy of that file that has an index recreated and remove the original and save the copy and all the usual replacement methods.

mencoder -idx files1.avi -ovc copy -oac copy -o file2.avi

Here file1.avi is the input file, and file2 is the output file with corrected index.