Wednesday, October 24, 2012

Converting your Room Into a Pin-hole Camera

In this blog, I am going to talk about how to convert your room into a Pin-Hole camera. All you need it just a sheet of thick black paper, and a few rolls of tape.

You can see below a panorama of my entire room

Stitched using 95 images, F2.5, Shutter Speed 2sec.
Lucky for me there was only one window. I covered it with a thick sheet of black paper and punched a hole in it. Once done, you can see this beautiful view of the outside world on the walls. Since its a real-image, you will see everything inverted.

The light entering the room is very less, ( only one hole in the window ). So you will have to give some time for your eyes to settle before you can see this view.

Looking forward to read more from you. Do write back with your comments, views and suggestions.

Friday, April 27, 2012

Calling Matlab Functions from Linux Terminal

I had been thinking of how could I call Matlab functions from command line in a Linux environment and pass arguments to it. This post will elaborate on that. 

For starters, lets see how to call Matlab scripts in linux environment

matlab -nodisplay -nosplash -nojvm < sample.m > Output.txt

The sample.m   will run just as it would have ran if you would have started it from Matlab command prompt. Now lets see how would you call functions in the same way. The crucial part is how to pass arguments to the function

matlab -nodisplay -nosplash <<EOF

cd $WHERE_YOUR_FUNCTION_LIVES

My_Function( arg1, arg2 )

EOF


I hope this is of some help to you. Feel free to comment with your suggestions, queries, or ideas. I would be more than happy to help you.

Regards, 
Hrushikesh