Sep 8, 2013
The month of December had just started. Winter monsoon was already at its peak bringing more rain to the plains. Flood damages and record low temperatures were the topics discussed by everyone in the southern states of India. Only a couple of weeks ago, one of the worst cyclones hit the entire state of Andhra Pradesh propagating its remnants in the form of frequent rains scattered all over Tamil Nadu.
"I was on my 39th week into my pregnancy with my first baby. I still remember the day vividly", Kamatchi recollected that momentous day from her past.
Kamatchi is 55 years old now. Age had painted extra wrinkles on her face, adding more beauty with maturity. A few black hairs on her head showed that she still have years to live and share her life stories with generations.
"It happened 36 years ago! I was only seventeen then", she traversed through time. "Only a year before did I enter into the wedlock. I wanted to complete my school education but my parents had other idea"
I paused and reflected on myself. I am Swati, Kamatchi's last daughter. When I was 16, going to school was a norm. To my generation, it was hard to believe that completing a school or going for graduate studies was a privilege once.
That is when I felt that my mother is a phenomenal women I have ever seen. She wanted to see her daughters graduate in higher studies, that which was denied to her when she was young.
"What other idea did your parents have mother?", I asked her. I was as curious to know about her first pregnancy as I was with my own.
"It was to align with the society's expectations of getting their daughter married as soon as she attained her puberty. Within a few months of my marriage, I became pregnant".
I recollected my prenatal appointments with an obstetrician. "Did you visit doctor regularly?", I asked her curiously.
"My dear, during my days, my mother and other elderly women in our locality were the obstetricians. Each day they would prepare some healthy food cooked with herbals and make me eat. This, they said, would take care of nausea and other pregnancy related complications".
"Did not you feel any complications?", I asked her curiously recounting my days of nausea.
"Not that I can remember, until the day my water broke, that is to say".
"What happened then?", I asked her.
"It was around 11.30 in the night when my water broke. There was continuous rain since the previous night. Most roads were filled with knee-deep water. As soon as my water broke, I started getting convulsions. I could not bear pain any longer. But then, we did not have a car or a two wheeler to be rushed to the hospital".
"How did you reach the hospital then?", anxiety engulfed me.
"My father made my mother and myself wait outside of our house, walked to the nearest railway station to enquire about the next train that would take us to town".
A stark contrast hit my mind hard. On the day when my water broke, I called my best friend who had earlier happily agreed to give us a ride to the hospital.
"My dad came home with his face lit brightly", she said, breaking my chain of thoughts. "Come soon. A train is about to arrive at the station. I had already bought the tickets". For the first time, I felt God is listening to my prayers.
Holding my father and mother's arms from both the sides, we walked to the nearest railway station, all the while my mouth chanting "Mariamma", begging her to be with me till I pull this through.
There was a power outage then because of heavy rain. By the time we walked through the muddy waters and hasted to the station, the train had arrived.
We got down at the town railway station and reached the government hospital by a bullock cart. My father sent for a nurse to attend me, who in turn had sent the news to the lady doctor on call. The doctor, who had just came from her home, injected chloroform, a full body anaesthesia.
"Were they monitoring your blood pressure and baby's heart beat?", I asked her innocently.
"Who knows? The next thing I know was that my daughter was born".
Labels: short story
Aug 25, 2013
Aug 16, 2013
Rick Rosson is a Senior Applications Engineer at Mathworks, a company that developed the Matrix Laborary (Matlab) software. He gave a talk on top ten productivity tools in Matlab, most of which I already knew. Still, I liked the talk because I got a free Matlab logo sticker for answering correctly to a question he posed during the talk (Yay!).
Here is the list of top ten productivity tools in Matlab according to Rick Rosson (not in any particular order though).
- Code Analyser
- Section Mode
- Command History
- doc command
- Tab completion
- Inline syntax guidance
- Automatic variable name change
- Matlab path
You can read about all the above ten tools from Mathworks website, however, let me give you a brief introduction to each of the tools.
Code Analyser: This is a new feature in Matlab which you will find at the top right corner of Matlab editor window. If your script is error free, the code analyser indicator will turn green indicating everything is alright. If your code is inefficient, or has error which does not affect the execution of the code, it turns yellow. As you would have probably guessed by now, the code analyser indicator turns red if there is any error in your script that affects the execution of the code.
Section Mode: As a Matlab user, you would have probably known that '%' symbol at the beginning of a line is used to comment a sentence. Instead, if you use '%%' symbol, it will still work as comment, but in addition, it starts a new section. So if you are writing a code which can be split into several sections (or modules), you can separate them by using '%%'. For example, you can have a section to read or import the data, another section to analyse the data and one more for making plots.
Publishing: One useful feature about Matlab is its ability to publish a report in the form of pdf or html or in many other formats. Traditionally, I execute each plot, save them as jpg or eps format and manually add/import results to create a presentation file or a report in word format. All these can be done now at the click of a button. What more? The comment tag that you type followed by the '%%' symbol will become section header when you publish!
Command History: Had a bingo moment when you created that plot some time ago, but struggling to find how did you create it later on? Command History comes to your rescue in such situations. As the name suggests, the command history windows remembers all the commands you had every typed since the last time you cleared the history manually. You can even select a portion of history and make a script out of it.
doc command: While help command gives you a rough idea of what the function is about, doc command will give you more details and insight of the function. In other words, doc gives you a complete documentation about a function which you want to learn how to use.
Tab completion: This, I think, probably came from working in a Linux environment. Its probably useful when you are creating a Matlab script that runs to 1000s of lines. To speed up writing a code, type first few characters of a command (typically two to three characters) and then hit Tab command to autofill, or to choose the right command from a list of options.
Inline syntax guidance: You probably have an idea of name of a function that you want to use, but not sure about its syntax? Don't worry. Just type the function name and wait for fraction of a second. The inline syntax guidance will pop up with a help window showing various syntax options by which the function can be called.
Automatic variable change: Suppose if you have written a function for a specific problem. And now, you want to generalize it by changing specific variable name such as 'temp' to more general variable name, such as 'x'. You have probably done this using find and replace tool. But the catch is that there could be several variables starting with temp, for eg, tempoutside, temproom. Find and Replace would probably do a nasty work (if you do try, you will get xoutside, xroom instead of general variable names such as x1, x2 etc). Automatic variable change does this job more efficiently. Just change the variable name 'temp' to 'x', hold the Shift Key and hit Enter button. It will search and replace only the variable name 'temp'.
Matlab path: addpath command adds the path to custom library folder where users can create and save custom library files specific to their work. By default, Matlab would search for a function in the current directory. In case the current directory does not have the function file, addpath will tell Matlab where to search for it.
startup.m: Instead of using addpath command every time you open a new session in Matlab, you can write a startup script and set all the paths. Matlab would execute the startup script every time it is started, and automatically add paths to various custom libraries and functions.
In addition to the top ten productivity tools, Rick also listed ten more productivity tools. They are
- tic toc
- file compare
- todo fixme
- stack browser
- plot browser
- plot tools
- generate script
- file import wizard.
Thanks to audience's frequent interruptions and their effort to make this talk "An introduction to Matlab", Rick did not have time to discuss about these ten tools. But then, we have Google right?
Aug 7, 2013
When it comes to Astrology, entire population on earth fall into two groups; the first group are the ones who do not believe in astrology, while the second group are those who believe in astrology with a question, “People have been believing it for several millennium. How can they all be wrong?”.
True. There are evidences pointing out that kings had referred to astrology to predict the outcome of a war or natural calamities such as flood and drought. Astro bodies at certain positions were considered as a positive omen to start a public project such as building bridges, dams or temples and sometimes, even for the journey of a pilgrimage.
Does the position of certain astronomical bodies such as sun, moon and planets really have an effect in predicting human behaviour? May be, may be not. But that is not what I'm going to write about in this blog post. Rather, I am going to focus on understanding the rationale behind astrology, scientific arguments which has made many generations believe in this field.
Let me first introduce you to the framework of a horoscope. The following picture shows a typical Tamil horoscope (also known as Jathagam). The building blocks of such a horoscope are the twelve boxes, popularly known as houses.
Typical horoscope showing position of major planets
Before explaining the significance of twelve, let us first look into one of the most profound mathematical concept; 360 degrees. Many things that happens around us can be explained using 360 degrees. For example, earth completes 360 degrees when it revolves around itself once. It completes 360 degrees when it completes one full rotation (orbit) around the sun. Similar to Earth, other planets also complete 360 degrees for one full revolution about itself, or one full orbit around the sun. Moon completes 360 degrees to orbit around earth.
How can we perceive this 360 degrees movement of various astronomical bodies based on observations from a naked eye? There are several ways to do it. One simple way is to divide 360 degrees into 360 1 degree sectors and keep track of the planets when the move from one sector to another. However, certain planets such as Jupiter are farther away from the sun that it is extremely difficult to keep track of their 1 degree movement using naked eye.
We need to divide 360 into larger sectors to make the objects traceable. How large? Let us say, 4 sectors of 90 degrees each? The problem with such as fewer number of segments is that it becomes impossible to track the faster movement of planets that are closer to sun, such as Mercury. So just like one would conduct a grid independence study, based on experience people have found that having 12 sectors of 30 degrees each will make this problem traceable. But, on what rational basis did they arrive at twelve?
Long time ago, when there were no telescopes and technological gadgets around, people relied on naked eye observations. With no city lights to pollute, clear sky nights were absolutely dark that they were able to see far more stellar objects that are possible to see today only with the help of powerful telescopes.
One disadvantage of such a dark and starry sky is that it is extremely difficult to keep track of the movement of one particular object over a period of time. Solution? They started looking at the star's background to find its relative position with respect to other stars in its vicinity. In order to remember the position of various stars in the surrounding of the planet under observation, they identified some of the bright stars which does not move (on a relative scale) with respect to the planet. To make the problem more easier, they grouped some of those bright stars to form a shape that is easy to remember. In other words, they formed a constellation.
They identified twelve major constellations with the help of twenty seven brightest and easily recognizable stars. The twelve constellations were roughly 30 degrees apart. So the problem of tracing a planet is now reduced to identifying in what background (constellation) does the planet lies at a specified time.
We would love to give names to anything right? Of course, we give names not only to the newborn, but also to pets and things around. So its not a wonder that people named those constellations (houses) based on their patterns such as Aries (Mesha), Taurus (Vrishabha) etc.
Now all that one needs to do is to find in which house (constellation) does each of the observable planets reside at the time of their birth. In the typical example shown in picture above, one can see that when viewed from the Earth (that's the reason why you won't find Earth in any of the houses), Mercury would set before sun while Venus sets right after sunset, followed by the Moon. When the sun and moon are in the same house, it is no moon day (or Amavasa) and when the sun and the moon are 180 degrees apart (or 6 houses apart), it is full moon day (or Purnima).
In terms of time, Earth takes 24 hours to complete one full revolution around itself (360 degrees). In other words, it takes 2 hours to rotate by 30 degrees. Since sunrise and sunset is defined with respect to Earth's rotation, the setting time of Mercury (Venus) would not be more than 2 hours before (after) sunset. However, using the same chart, it is possible to fix our frame of reference for time on some other planet as well.
For example, Jupiter takes 11.86 Earth years (4332 Earth days) to complete one orbit around the Sun (360 degrees). Hence, in order that Jupiter moves its position from one house to another (Transit of Jupiter) it will take 361 days (~ 1 Earth year).
Now the main question still remain. Does the location of planets in an arbitrary background at the time of one's birth have any significance in predicting their future? I will leave it up to the readers to find an answer to this question!