Wednesday, November 10, 2010

~ Hajj; the journey of Hearts

Salam alaik,

'Hajj' literally means to set out..
And there is a major difference between setting out & hanging out (for the heck of it).
For setting out is with a sincere solid intention -- infact ambition -- to go out & about to achieve something.
[ keep repeating these semantics to myself; helps me to purify my intention from time to time.]

1800's oldest snaps ever of Kabah tuLLAh


As we age, our life journey exerts an effect on us of types, we grow get seasoned so on & so forth.
Likely so, the journeys we embark on for places of kinds, render our thoughts & the way we look at our lives & ourselves mature enough to get the best out of our days ahead of us..


closeup

Hajj journey is one such life-changing event.
I don't even consider it a journey.. its more than that.. its odyssey.. an ongoing never ending one.
Uniformity, simplicity, serenity.. all packed at one place at one time.. its amazing.

[& uniform reminds me of this vid & the dude in it on wearing ihram.]

http://www.youtube.com/watch?v=AJ-74409sjM


No particular plans to write an all elaborated evocative article on Hajj today.
Just sharing the feel here & some Hajj tips i've learnt to keep handy;

  • Shukar (thankfulness) - Always do shukar, try remembering & recalling all the blessings of Allah.


  • Sabr (patience) - Increase ur sabr scope & span [as in; What are the things you do sabr on? What are the ones on which you lose it? List them, and then start moving things into sabr list]


  • Dua (prayer) - "O Allah, make the last part of my life the best part in front of u, and the last deed the best deed in front of u."


  • Time/Places for Dua:

    1. After drinking Zamzam water.
    2. Looking at Kabah-tu-LLah
    3. During Tawaf (circumambulation), b/w Rukn-al-Yamani & Hijr-ul-Aswad
    4. While standing on Safa & Marwa hills.
    5. Youm al Arafah.
    6. In Muzdalifah.
    7. After stoning Jamarah.


  • I find this link particularly useful;
    The_inner_dimensions_of_hajj

    Take the Quiz in the Extras top tab, & lets see how well you fare in your general knowledge of Hajj, & doing so get the yummy cookie of unlocking the 'Hidden Extras'..


    Quran recitation from 1885;



    ~*~*~*~*~~*~*~*~*~

    Sunday, September 26, 2010

    ~ To a Research Rookie

    Salam alaikum,

    http://www.youtube.com/watch?v=NugRZGDbPFU

    so i got this pm from someone somewhere the other day, that went like so;

    On 09/14/10 8:14 PM, He wrote:

    Hi...
    I am a undergrad. fresh mechanical engineer from NUST-PNEC and I've keen interest in R&D but the problem is I don't want to go abroad or join defence organizations due to some personal reasons... I had the following questions in my mind:

    1. How can I actively participate in R&D?
    2. What is the advantage of writing a research paper?

    Thnx in Advance..

    --------------------

    On the fly, i wrote back;

    wa alaikum salam warahmatuLLAh brother,

    am traveling, hence the delayed response.
    its best to start with a salam -- if it ain't a generic statement you've sent to many besides me.
    your questions are intriguing & need a detailed response, which i will inshallah, once feasible.
    meanwhile, i'll be interested to know those personal reasons that hinder you from joining defense orgz back home.

    wa'salam
    - bother the brevity, courtesy of my doodad..err..iphone.
    --------------------

    I received yet another swift one this time;

    5:33 AM, He wrote:

    Asalam-o-Aliekm,

    Jazakallah for correcting me... Well, I contacted professionals already in this field and i found that u were one of them... :)

    I can wait for ur response.. but pls reply as soon as possible.

    About defense, I ve seen some results like Dr. AQ Khan, therefore i feel uncomfortable.

    Wsa'lam
    --------------------

    So yeah, once in shape i had to reply, which went like so;


    Wa alaikum salam warahmatuLLAh,

    wa iyyak, & here is the detailed reply i promised earlier on;

    There are several ways of participating in R&D.
    But prior to pointing em all, you first need to evaluate yourself, your skill-set and aptitude / interests to figure out if you are:

    a) a theoretical guy
    b) a practical guy
    c) or both.

    If you love to read n understand equations working behind a system, without giving a bunny's bum to the reality of the system / you are clueless about the where abouts of stuff in a car engine / never messed up with your computer hardware and OS for the fear of it -- then you should go into theoretical research.

    If equations give you creeps and you love to destroy and fix things -- then you should be doing experimental research.

    If you are jack of all -- then you are one great resource for this country.

    Next you need to evaluate:
    what are you interested in?
    Solar energy / wind turbines / engineering design / structures / control systems, ... the list goes on & ever.
    The best way is to shortlist the areas.

    Finally, you need to see if you've acquired enough to carryout research in your area of interest. You need to either join a group already working in the area (in a university or a company), or find people / professionals / classmates interested in the same topic.

    Now, in order to share your idea with other people for them to understand your thoughts, you need to write it down.

    For that, first you need to jot down quite briefly what do you want to achieve?
    what approach you will take?
    and what do you expect?
    this should be the first para and will be the abstract of the document.

    Next, you need to write the introduction section, which will provide the motivation behind the idea ;
    - why is this idea important? whats the need?
    if anyone else has already worked on the idea, then;
    - what did they do? and what are the shortcomings of their work if any?
    & then your own approach in simplest words;
    - whats soo new about it? and what are its advantages?

    You'll then provide your method of tackling the problem, and give a prediction about its performance.

    The most important thing is clarity of the document, i.e., when given to different people, each gets the same picture of your approach. Now thats not easy! (but not impossible either)

    Why to go through so much pain?
    So that, others can understand your idea, your approach and help you improve your idea. Someone can tell you its already thought about, giving you critical feedback; your approach lacks this and that. Someone could just suggest other possible approaches etc.
    This will give you an idea if your idea is worth it or not.

    Once the groundwork for your research has been laid down, you can carry it out, be it derivations, or making a system, or both.

    Last but not the least, you need to tell the world what you did. This will require you to write a research paper, which will target a wider audience, and will provide more diverse feedback and thus your research will continue to improve on...inshAllah.

    hth..
    n good luck!
    ---
    by the by, some suggested reads;
    ~ tips for technical paper
    ~ how to have a bad carrier in research

    ~*~*~*~*~~*~*~*~*~

    Wednesday, August 18, 2010

    ~ Reality of Calamity

    Salam alaik,


    no place to take a nap.. :/


    Just encountered this on my surf-slide;
    Viewpoint Column..

    Calamity clears out the reality of a man, just like rage reflects the inner self.

    The irony seeps in, when after every any calamity a group of people - who (rest assured) ain't even remotely affected by that calamity themselves, leading an absolutely 'eat drink n be merry' lifestyle - start crowing out together, categorizing any said calamity as a test only & mocking at the other set of people doing istighfaar. Sometimes even ending up (out of sheer ignorance or arrogance - whichever that is) jesting & jeering the obligation & Beloved's Sunnah of repentance itself.

    No body gives (or should give) a dead dime or a bunny's bum on what such intellectually-dishonest among us have got to say out of their skewed sense of Ahkaam of Islam, but when it comes down to open mockery of Quran & Sunnah...then may Allah guide them or wipe them  (out)

    Without delving into much of that hoopla; a trash tarnishing our national demeanour, i'd jot down few bullet-points here to clear out once n for all;
    • Allaah says (interpretation of the meanings):
    “Whatever of good reaches you, is from Allaah, but whatever of evil befalls you, is from yourself”
    [al-Nisaa’ 4:79]
    • Allaah says (interpretation of the meanings):
    “And whatever of misfortune befalls you, it is because of what your hands have earned. And He pardons much”
    [al-Shoora 42:30]
    • Allah says, translation of which is;
    “And We sent not the signs except to warn”
    [al-Israa’ 17:59]
    • And Allaah says (interpretation of the meaning):
    “Did the people of the towns then feel secure against the coming of Our punishment by night while they were asleep? Or, did the people of the towns then feel secure against the coming of Our punishment in the forenoon while they were playing? Did they then feel secure against the Plan of Allaah? None feels secure from the Plan of Allaah except the people who are the losers.” 
    [al-A’raaf 7:97-99]
    • Allaah says (interpretation of meaning):
    “Verily, We sent (Messengers) to many nations before you (O Muhammad صلى الله عليه وسلم). And We seized them with extreme poverty (or loss in wealth) and loss in health (with calamities) so that they might humble themselves (believe with humility).
    When Our Torment reached them, why then did they not humble themselves (believe with humility)? But their hearts became hardened, and Shaytaan (Satan) made fair‑seeming to them that which they used to do.
    So, when they forgot (the warning) with which they had been reminded, We opened for them the gates of every (pleasant) thing, until in the midst of their enjoyment in that which they were given, all of a sudden, We took them (in punishment), and lo! They were plunged into destruction with deep regrets and sorrows”
    [al-An’aam 6:42-44]
    • Allah says, translation of which is;
    “Say: ‘He has power to send torment on you from above or from under your feet, or to cover you with confusion in party strife, and make you to taste the violence of one another.’”
    [al-An’aam 6:65]
    • Allah says, translation of which is;
    “Evil (sins and disobedience to Allaah) has appeared on land and sea because of what the hands of men have earned (by oppression and evil deeds), that He (Allaah) may make them taste a part of that which they have done, in order that they may return (by repenting to Allaah, and begging His Pardon)”
    [al-Room 30:41]
    • Allah says, translation of which is;
    “We will show them Our Signs in the universe, and in their own selves, until it becomes manifest to them that this (the Qur’aan) is the truth. Is it not sufficient in regard to your Lord that He is a Witness over all things?”
    [Fussilat 41:53]
    • And Allaah said concerning the nations of the past, translation of which is:
    “So We punished each (of them) for his sins, of them were some on whom We sent Haasib (a violent wind with shower of stones) [as on the people of Loot (Lot)], and of them were some who were overtaken by As-Saihah [torment — awful cry, (as Thamood or Shu‘ayb’s people)], and of them were some whom We caused the earth to swallow [as Qaaroon (Korah)], and of them were some whom We drowned [as the people of Nooh (Noah), or Fir‘aun (Pharaoh) and his people]. It was not Allaah Who wronged them, but they wronged themselves.”
    [al-‘Ankaboot 29:40]
    • Al-Bukhaari narrated in his Saheeh from Jaabir ibn ‘Abd-Allaah (may Allaah be pleased with him) that when the aayah (interpretation of the meaning) “Say: ‘He has power to send torment on you from above” was revealed, the Prophet (peace and blessings of Allaah be upon him) said, “A’oodhu bi wajhika (I seek refuge in Your Face”; “or from under your feet”, he said, “A’oodhu bi wajhika (I seek refuge in Your Face).” (Saheeh al-Bukhaari, 5/193).
    (Abu’l-Shaykh al-Isbahaani narrated from Mujaahid concerning the Tafseer of this aayah, “Say: ‘He has power to send torment on you from above”: (this means) al-Sayhah (the shout or tumult), stones and strong wind; “or from under your feet”, (means) earthquakes and being swallowed up by the earth.)
    • The great scholar Zakariya al-Ansaari (may Allaah have mercy on him) said:
    It is mustahabb for everyone to beseech Allaah in supplication and so on when earthquakes and similar events, such as thunderbolts and strong winds, happen, and to offer prayers on his own in his house lest he be negligent, because the Prophet (blessings and peace of Allaah be upon him) said, when the wind blew strongly: “O Allaah, I ask You for its good and the good of what is in it and the good of what it is sent with, and I seek refuge in You from its evil and the evil of what is in it and the evil of what it is sent with.” Narrated by Muslim.
    End quote.
    [Asna al-Mataalib Sharh Rawd al-Taalib (1/288). See also Tuhfat al-Muhtaaj (3/65).]

    Al-‘Allaamah Ibn al-Qayyim (may Allaah have mercy on him) said: “Allaah sometimes gives the earth permission to breathe, which is when major earthquakes happen; this makes people feel scared, so they repent, give up sins, pray to Allaah and feel regret [for their sins]. When there had been an earthquake, some of the Salaf said: your Lord is warning you. When Madeenah was struck by an earthquake, ‘Umar ibn al-Khattaab (may Allaah be pleased with you) addressed the people and said: if there is another earthquake, I will not stay here with you.”
    [mentioned by Ibn al-Jawzi in al-Muntazam, among the events of the year 20 AH.]

    And there are many similar reportes from the Salaf.

    Undoubtedly, the earthquakes & such calmaties that are happening these days are among the signs which Allaah uses to frighten His slaves. All the earthquakes and other things which happen and cause harm and injury to people are because of shirk and sins, as Allaah says (interpretation of the meanings):

    “And whatever of misfortune befalls you, it is because of what your hands have earned. And He pardons much” [al-Shoora 42:30]
    “Whatever of good reaches you, is from Allaah, but whatever of evil befalls you, is from yourself” [al-Nisaa’ 4:79]

    Solution:

    Shaykh Ibn Baaz (may Allaah have mercy on him) said:

    "What must be done at the time of an earthquake or other calamity, or an eclipse, strong wind or flood is to repent to Allaah, may He be glorified, and to beseech Him and ask Him for well-being, and to remember Him a great deal and ask Him for forgiveness, as the Prophet (blessings and peace of Allaah be upon him) said at the time of an eclipse: “When you see that, then turn to remembrance of Allaah and call upon Him and ask for His forgiveness.” Agreed upon. It is also mustahabb to show compassion to the poor and needy, and to give charity to them, because the Prophet (blessings and peace of Allaah be upon him) said: “Show mercy, you will be shown mercy.” (Narrated by Ahmad) And he said: “Those who show mercy will be shown mercy by the Most Merciful. Show mercy to those who are on earth and the One Who is in heaven will show mercy to you.” Narrated by al-Tirmidhi. And he (blessings and peace of Allaah be upon him) said: “The one who does not show mercy will not be shown mercy.” Narrated by al-Bukhaari. It was related from ‘Umar ibn ‘Abd al-‘Azeez (may Allaah have mercy on him) that he used to write to his emirs when earthquakes took place telling them to give charity.

    One of the means of being safe and sound from all evils is for those in authority to hasten to restrain and impose an immediate crack-down on the foolish elements in society, & compel them to behave & adhere to the truth, and to implement the laws of Allaah among them, enjoining what is good and forbidding what is evil [Amr bil Ma'roof wa nahi anil Munakr], as Allaah says interpretation of the meaning is:

    “The believers, men and women, are Awliyaa’ (helpers, supporters, friends, protectors) of one another; they enjoin (on the people) Al‑Ma‘roof (i.e. Islamic Monotheism and all that Islam orders one to do), and forbid (people) from Al‑Munkar (i.e. polytheism and disbelief of all kinds, and all that Islam has forbidden); they perform As-Salaah (Iqaamat-as-Salaah), and give the Zakaah, and obey Allaah and His Messenger. Allaah will have His Mercy on them. Surely, Allaah is All-Mighty, All-Wise”
    [al-Tawbah 9:71]

    “Verily, Allaah will help those who help His (Cause). Truly, Allaah is All‑Strong, All‑Mighty.
    Those (Muslim rulers) who, if We give them power in the land, (they) enjoin Iqamat‑as‑Salaah [i.e. to perform the five compulsory congregational Salaah (prayers) (the males in mosques)], to pay the Zakaah and they enjoin Al‑Ma‘roof (i.e. Islamic Monotheism and all that Islam orders one to do), and forbid Al‑Munkar (i.e. disbelief, polytheism and all that Islam has forbidden) [i.e. they make the Qur’aan as the law of their country in all the spheres of life]. And with Allaah rests the end of (all) matters (of creatures)”
    [al-Hajj 22:40-41]

    “And whosoever fears Allaah and keeps his duty to Him, He will make a way for him to get out (from every difficulty).
    And He will provide him from (sources) he never could imagine. And whosoever puts his trust in Allaah, then He will suffice him. Verily, Allaah will accomplish his purpose. Indeed Allaah has set a measure for all things”
    [al-Talaaq 65:2-3]

    And there are many verses with similar meanings."

    End quote.
    [Majmoo’ Fataawa Ibn Baaz (9/150-152).]

    Earthquakes (or floods) are one of the great signs of Allaah in this universe, with which He tests His slaves as a reminder or to instil fear of Him or as a punishment. Man must remember, when the signs occur, his weakness, incapability, humble status before Allaah and his need of Him, so he turns to Allaah, may He be exalted and glorified, in supplication, beseeching and humility, in the hope that Allaah will lift this great distress from the people.

    Hence,

    What Muslims and others who are accountable and of sound mind must do is to; repent to Allaah, adhere firmly to His Religion and avoid all that He has forbidden of Shirk and sin, so that they may be safe and attain salvation from all evils in this world and the next, and so that Allaah will ward off from them all harm, and bless them with all good. Allaah says (interpretation of the meaning):

    “And if the people of the towns had believed and had the Taqwaa (piety), certainly, We should have opened for them blessings from the heaven and the earth, but they belied (the Messengers). So We took them (with punishment) for what they used to earn (polytheism and crimes).” [al-A’raaf 7:96]

    And Allaah says concerning the People of the Book (interpretation of the meaning):

    “And if only they had acted according to the Tawraah (Torah), the Injeel (Gospel), and what has (now) been sent down to them from their Lord (the Qur’ân), they would surely, have gotten provision from above them and from underneath their feet” [al-Maa’idah 5:66].

    In light of overwhelming evidence form Quran & Sunnah, Scholars respond that when there is an earthquake or some other sign such as an eclipse, strong winds or floods, one should hasten to repent to Allaah and pray to Him for safety, and to remember Him much and seek His forgiveness, as the Prophet (peace and blessings of Allaah be upon him) said when there was an eclipse:
    “If you see anything like that, hasten to remember Him, call on Him and seek His forgiveness.”
    (Part of an agreed-upon hadeeth narrated by al-Bukhaari (2/30) and Muslim (2/628)).

    It is also mustahabb (recommended, encouraged) to show compassion to the poor and needy, and to give charity to them, because the Prophet (peace and blessings of Allaah be upon him) said:

    “Show mercy, you will be shown mercy.”
    (Narrated by Imaam Ahmad, 2/165)

    “Those who are merciful will be shown mercy by the Most Merciful. Have mercy on those who are on earth, and the One Who is in heaven will show mercy to you.”
    (Narrated by Abu Dawood (13/285), al-Tirmidhi (6/43)).

    “Whoever does not show mercy will not be shown mercy.” (Narrated by al-Bukhaari (5/75), Muslim (4/1809)).

    It was reported that when there was an earthquake, ‘Umar ibn ‘Abd al-‘Azeez (may Allaah have mercy on him) would write to his governors telling them to give in charity.

    The Prophet ( peace and blessings of Allaah be upon him) said: “Whoever meets the need of his brother, Allaah will meet his needs.” (Agreed upon; al-Bukhaari, 3/98; Muslim, 4/1996).

    And he ( peace and blessings of Allaah be upon him) said: “Whoever relieves a believer of some of the distress of this world, Allaah will relieve him of some of the distress of the Day of Resurrection. Whoever makes things easier for one who is suffering hardship, Allaah will make things easier for him in this world and in the Hereafter. Whoever conceals a Muslim’s faults, Allaah will conceal his faults in this world and in the Hereafter. Allaah will help a person so long as he helps his brother.”
    (Narrated by Muslim, 4/2074). And there are many ahaadeeth on this topic.

    One should offer du’aa’ as inspired by Allaah to ask for mercy and help from Allaah, may He be exalted and glorified, so that He might divert this calamity from the people.

    Allaah is the only One Whom we ask to reform the affairs of all the Muslims and to bless them with proper understanding of Islam and help them to adhere steadfastly to it and repent to Allaah from all their sins. We ask Him to reform all those who are in authority over the Muslims’ affairs and to support the Truth and eradicate falsehood through them, and to help them to rule the people according to the laws of sharee’ah, and to protect them and all the Muslims from misguidance and temptation and the tricks of the Shaytaan, for He is Able to do all that.

    May the blessings and peace of Allaah be upon our Prophet Muhammad, and upon his family and companions, and those who follow them in truth until the Day of Resurrection.

    And Allaah knows best.
    ~*~*~*~*~~*~*~*~*~

    Monday, August 02, 2010

    ~ The Suicidal Assassins

    Salam alaikum,

    They are amongst us; as family members, as friends, as sibling, as parents, as children.
    Beware! since these assassins attempt to victimize themselves and those around them to a slow painful death.

    Personally they are perfectly normal humans, with no wish to inflict damage to their near and dear ones.
    But they choose to embrace a dis-ease which is like a slow-mo suicide.
    The affecting effect is long-term, with long-reach & is devastating.
    Even people of high intellect get infected to it by choice, and in doing so prove that education, knowledge & intelligence can't rid one of stupidity.


    Do you recognize them?
    These are the people puffing n coughing deadly smoke out of their mouths every now n then, hurting themselves & people around them through passive smoking, knowing its hazards all along; .. these are the cigarette addicts, commonly called the (active) Smokers.


    A smoker is guilty of several accounts, a few are listed like so:
    1. Life and health is trusted from Allah to humans, taking care of it is a duty. A smoker ignores this duty. 
    2. Smoking is slow suicide which is forbidden in Islam.
    3. Smoking is an addiction which is forbidden in Islam
    4. Smoking is a waste of time. 
    5. Spending money on smoking is a waste of money; 'israaf'.  
    6. A smoker ignores the warning given by people around him, and on the cigarette packs, and therefore holds complete responsibility for his actions.  
    7. A smoker is a threat to the life of his wife and lil children. 
    8. A smoker is a threat to his friends and colleagues. 
    9. A smoker has a foul smelling mouth which causes discomfort to Allah's creatures while praying in congregation.
    10. A smoker is a potential fire hazard. 
    11. A smoker is harmful to nature around him, such as, plants, birds etc. 
    I, by no means, am attempting or tempting to create hatred against smokers, rather these sick people need our attention & care; we need to brain-storm a way to knock some sense into them.
    May Allah rid all the smokers of their addiction.
    Amin.


    ~*~*~*~*~~*~*~*~*~

    Thursday, July 29, 2010

    ~ Innovation exploitation

    Salam alaik,

    Prediction or extrapolation offers the ultimate test of the information-content one possesses.
    This process is most evident in toddlers, trying to explore the world around learning to walk n talk.
    The ability that the Creator; Allah, has bestowed upon them is to be curious enough to learn_by_making_mistakes.
    In other words, this ability allows one to compare an expected_out_come against actual _out_come.

    Herez a make up example to explain: a child has some cool toy with black n white colors on it which he likes. Now he looks at the black n white colored stove & ponders, "hmmm... this (stove) looks cool, must be playable." Poor child burns his hand but learns a great deal - albeit the hard way - that all black n white stuff ain't so cool.
    There was an error in the prediction - a great deal in this case - but lesson learnt was lasting nonetheless.


    A less forgiving case is that of exercise questions at the end of chapters, written by seasoned authors.
    A student uses the information given in the chapter to solve the exercise questions (which are not plug_this_formula_n_get_answer sort), only to find out that he couldn't quite get hold of it.
    He goes back, reads up the same info over again from the perspective of the question, & try giving it another shot based on that info.
    He, actually, is predicting & then improving on his grip about the subject from his initial error.

    Same is the concept of Kalman filtering, i'm into these days.


    Its a probability-based digital filter capable of filtering 'white noise', using its own error-information.

    Here, the difference between a prediction and reality is called "innovation", & learning is all about exploiting that "innovation".


    more on it laterz sometime.. inshAllah
    ~*~*~*~*~~*~*~*~*~

    Friday, July 23, 2010

    ~ Soaring the Simulation

    Salam alaik,

    Thinking Vectors & Matrices.. its either my way or MATLAB's way..

    On a semi-sarcastic side note though, Guys having C or Java background write a MATLAB script just as they'd do that in C, i.e. using loops.
    MATLAB is all about vectors & matrices.. so loops could be avoided consideably.
    To wit - Consider this simple example;

    Lets say we've got two vectors, like so;

    a = [1 2 3]' and, b = [4 5 6]'

    Now if we wantna take the dot product in C, we would write something like this for loop in C;

    c[i] = a[i]*b[i];

    While in MATLAB its simply;

    c = a'*b; %(a Transposed x b),

    So, in essence it does the looping for us.. clean & simple.

    Coming back to Simulations..
    A cool tool for writing communication system simulations; MATLAB, offers two approaches to do so;

    1. MATLAB scripting language.
    2. Simulink blocksets.


    The former is recommended for the proof_of_concept development usually required in academic & research projects, while the latter is for rapid prototyping in time-constrained industrial projects.
    I, for one, usually use the first approach, as my work involves research & development.
    The key to make a script time-efficient is to;

    a. Think in vectors and matrices.
    b. Avoid unnecessary loops here & there.
    c. Initialize large vectors and matrices before use.

    With these simple tips one could make life quite easy.

    Happy scripting...

    But wait..
    Sometimes the curves you get from MATLAB simulations aren't smooth enough, even after several 100th of runs. I usually smooth them out using:

    sgolayfilt(your_variable, m, F)
    where m=2,F=21.

    Result: cool looking curves, at the expense of one additional line in simulation section of your paper.

    Furthermore, I also change the font size & width of the curves using;

    h = plot(my_x, my_y); hold on; grid on;
    set(h, 'linewidth', 3);
    set(get(h, 'parent'), 'fontsize', 14);

    Result: .. even cooler 
    ;o)

    ~*~*~*~*~~*~*~*~*~

    Wednesday, July 21, 2010

    ~ Casting out the Colors

    Salam alaik,

    MATLAB generates cool looking colored ps-files.
    Unfortunately thoguh, most of the conferences & periodicals ask for gray scale images instead.
    It gives you a big pain_in_the_neck tryna find suitable colors that could be distinguished at gray-scale level, esp in cases when markers don't serve the purpose well enough.

    So..
    I've discovered a simple Color to gray scale trick.
    How to get around it is a little more tricky.
    & by the end of the toil u'll get MATLAB generated PS-files, by editing the ps file directly.

    First off, search for lines similar to;

    /c8 { 1.00000 0.000000 0.000000 sr} bdef

    Now lets dissect down this piece by piece..

    /c8: According to my calculations '/c' means color here and '8' is numbering that may vary.

    {1.00000 0.000000 0.000000 sr}: The RGB values; all values should be same & less than one for grey-scale. Note that all 'zeros' mean black, and all 'ones' mean white. Darker values are harder to distinguish, so I suggest giving more gap in values chosen between 0-0.5. While, less gaps can be afforded for values between 0.5-1.0.

    That little doo-dad will clear the remainder of the picture. Like so;
    Here is an example of a color image;


    Now ,we require 6 gray-scale values. I used [0 0.3 0.55 0.65 0.75 0.85], & VOILA!
    Here is the result;


    aint that a neat trick right there?
    It actually isn't much of a trick..
    see if u could come up with more trix.

    ~*~*~*~*~~*~*~*~*~

    Saturday, July 17, 2010

    ~ Fiddling with Figures

    Salam alaik,

    People've got an awesome practice of saving figures in the simulation script just after results are finalized.

    Its a jolly good habit for all i can tell, since it pretty much prevents a lot of future headache.

    No rocket science there..
    The function to save a MATLAB figure file "saveas"; can save in several formats including fig (matlab figure), bmp (bitmap - though not recommended), ai (adobe illustrator), psc2 (colored post-script - recommended for latex), so on n so forth.

    Fig files are useful in another sense, i.e., the data is automatically secured with it. n i'll show you in a minute -inshAllah- how data could be extracted from the saved fig files;
    1. Open the saved .fig file using open function. e.g., open abc.fig
    2. Use gcf to get the current figure pointer/handler and save it in a variable, e.g., h = gcf
    3. Use get command to get hold of the children of the gcf, H = get(h, 'children')
    4. Finally, search for the handle of the child which containts all the plots.
    5. Suppose H(2) is the child with all the plots, then use H2 = get(H(2), 'children')
    6. Now use set(H2(i)), where i = 1 to number of plots, to list all the properties and change their values.
    7. Similarly, use the get(H2(i)) to fetch the values of all the properties.


    For example, the script below extracts data from the plots.


    clear all;
    % open the .fig file
    open test.fig; 
    % get the current graph handle
    h = gcf; 
    % get the children of the figure file
    H = get(h, 'Children');
    % For this specific case the 2nd child has all the plots
    H2 = get(H(2), 'Children');

    Y = [];
    for i = 1:length(H2)
    % get the data of y-axis
        Y = [Y; get(H2(i), 'YData')];
    end

    Here is a test.fig, i fiddled with using the above script;


    ..enjoy.
    n happy scripting!

    ~*~*~*~*~~*~*~*~*~

    Thursday, July 15, 2010

    ~ M-ary Constellations

    Salam alaik,

    M-ary Phase shift keying (PSK) is not only simple but mathematically elegant too.

    The symbol values are the Mth root of unity & is given like so:

    exp(j.2.\pi.m/M), where m = 0, ..., M-1.


    Use the same expression in MATLAB with a bit of rotation for fun :p

    % the number of constellation points
    M = 16;
    m = 0:M-1;

    % obtaining the constellation points with pi/M rotation
    PSK_16 = exp(j*2*pi*m/M - j*pi/M);



    Here is the plot I quickly designed; the Mth roots of unity with rotation..


    Try out this 'M-ary_Quadrature_Amplitude_Modulated_Constellation' construction for yourself, & lemme know how good you go.

    ~*~*~*~*~~*~*~*~*~

    Tuesday, July 13, 2010

    ~ Communication..

    Salam alaik,

    have been a happy man ever since the advent of VoIP..

    VoIP is a wonderful thing for people whose role in life is to be on top of things.
    But not for me; my role is to be on the bottom of things.
    What I do takes long hours of studying and uninterruptible concentration. I try to learn certain areas of digital communications exhaustively; then I try to digest that knowledge into a form that is accessible to people who don't have time for such study.


    Otoh, I need to communicate with hundreds of people all over the world as I write my periodicals.
    I also want to be responsive to the people who read & review those articles and have questions or comments.

    My goal is to do this communication efficiently, in batch mode --- like, one day every three months. So if you want to talk to me about any topic, please use good ol' snail mail and send a letter to my postal address..
    You might also try faxing me. Chances are that it'll be seen last, perhaps once every six months instead of three.
    :o)
    ~*~*~*~*~~*~*~*~*~