Sunday, 24 November 2013

Cprogram to perform circular convolution

          I would like to write blogs which contains programs in C language or of MATLAB code.The reason is simple,I have a subject called Digital signal processing laboratory.It contains totally 24 programs and in exam we need to write just two,so some programs which I like out of the remaining ones I would like to write them in my blogs.
          C program :
#include<stdio.h>
int i,j,m,n,x[30],h[30],y[30],a[30],x2[30],temp[30];
main()
{
     printf("enter the length of the first sequence");
      scanf("%d",&m);
      printf("enter the length of the second sequence");
      scanf("%d",&n);
      printf("enter the first sequence");
      for(i=0;i<m;i++)
      scanf("%d",&x[i]);
      printf("enter the second sequence");
      for(j=0;j<n;j++)
       scanf("%d",&h[j]);
      if(m-n!=0)
{
    if(m>n)
   {
        for(i=n;i<m;i++)
        h[i]=0;
        m=n;
}
     for(i=m;i<n;i++)
      x[i]=0;
       m=n;
  }
      y[0]=0;
      a[0]=h[0];
      for(j=1;j<n;j++)
       a[j]=h[n-j];
     for(i=0;i<n;i++)
       y[0]+=x[i]*a[i];
     for(k=1;k<n;k++)
        {
            y[k]=0;
           for(j=1;j<n;j++)
           x2[j]=a[j-1];
          x2[0]=a[1-j];
          for(i=0;i<n;i++)
           {
                a[i]=x2[i];
               y[k]+=x[i]*x2[i];
         }
      }
          printf("circular convolution is ");
          for(i=0;i<n;i++)
          printf("%d\n",y[i]);

Saturday, 23 November 2013

C program to perform Npoint DFT

             I would like to write blogs which contains programs in C language or of MATLAB code.The reason is simple,I have a subject called Digital signal processing laboratory.It contains totally 24 programs and in exam we need to write just two,so some programs which I like out of the remaining ones I would like to write them in my blogs.
          C program :
#include<stdio.h>
main();
{
     float y[16],w;
     float  x[4]={1,3,2,5};
     int n,k,k1,N=8,xlen=4;
     for(k=0;k<2*N;k=k+2)
     {
           y[k]=0;
           y[k+1]=0;
            k1=k/2;
            for(n=0;n<xlen;n++)
           {
                 w=-2*3.14*k1*n/N;
                  y[k]=y[k]+x(n)*cos(w);
                  y[k+1]=y[k+1]+x(n)*sin(w);
          }
 }
     printf("%f+j%F",y[k],y[k+1]);
}

Friday, 22 November 2013

C program to perform circular convolution in CCS studio

           CCS,code composer studio is a integrated development environment for developing applications for Texas instruments embedded processors.I would like to write blogs which contains programs in C language or of MATLAB code.The reason is simple,I have a subject called Digital signal processing laboratory.It contains totally 24 programs and in exam we need to write just two,so some programs which I like out of the remaining ones I would like to write them in my blogs.
          C program :
#include<stdio.h>
int m=6,n=6,i=0,j;
int x[15]={1,2,3,,4,5,6,0,0,0,0,0,0,0};
int h[15]={1,2,3,,4,5,6,0,0,0,0,0,0,0};
 int y[20];
main()
{
     for(i=0;i<m+n-1;i++)
      {
            y[i]=0;
            for(j=0;j<=i;j++)
            y[i]+=x[i]*h[i-j];
}
     for(i=0;i<m+n-1;i++)
      printf("%d\n",y[i]);
}

Thursday, 21 November 2013

Photographs are wonderful memories

                      Photographs are not something which helps you know how beautiful/handsome you are but they also are great tools of memories.Memories are something which can make you happy,sad etc.Always have an habit of having wonderful memories in mind than the ones which make you feel bad or unhappy.Having the positive memories in mind always will get you more positive memories and helps you be positive always.
                  I am writing this blog because I just couldn't control my happiness looking at the wonderful photographs of my family taken recently during Dusshera festival.There was one huge photograph with frame which is a family photograph and I was just admiring it and lost in it for few minutes.
                 Always take photographs because it will serve as a wonderful collection of memories.Life is just once,live it to the fullest and live in such a way that your photos should be happiness,inspiration,strength to all the people in this world.

Wednesday, 20 November 2013

Surprises are just ULTIMATE!!

                  Surprise is a brief mental and physiological state,a startle response experiences as a result of an unexpected event.Surprises are unexpected and it's awesome to have great surprises in life.In fact Life is full of amazing surprises and you need to enjoy it.Infact Life is a calendar of unplanned or unexpected events.Be ready to enjoy the surprises given by God each day,take it in a positive way and you will surely enjoy it.
            There is no description in words for happiness,sadness,feeling when you get a great surprise.I am someone who loved surprises right from childhood and even today and for sure will always enjoy surprises in my life.But over the period of years I developed an extra thought or wish in me to give surprises to others than only enjoy the surprises given to me.I love giving surprises and my loved ones definitely will experience surprises from me regularly.
           When someone gives you surprise you become happy and when you give others surprise you become happy and the person whom you give will also become happy and that in turn will make you more happy.I wanted to write a blog on this topic because I experienced a wonderful surprise from my loved one today and the feeling was just heavenly.I wish to get surprises like this from this person always.
              "ENJOY LIFE AND AMAZING SURPRISES IN IT."

Tuesday, 19 November 2013

Sachin Tendulkar-Hats off to the master blaster

                  Sachin Tendulkar-This is a name which everyone in this world would have heard of atleast ones.There are millions of people who worship him as the GOD of a wonderful sport called cricket.I am a cricket lover and Sachin is a player whose name I have heard of right from the day I started watching cricket and I am sure that this name will buzz in everyone's ears throughout whenever it comes to cricket.
              I am not here to tell write about the stats of Sachin Tendulkar's career because there are newspapers,books,magazines,many website and the major search engine of the world-Google which can provide about his stats or wonderful achievements.
             I feel proud to be an Indian because an Indian is considered as the GOD of a game that was originated in england.I just love his game,commitment and dedication towards the game.He surely will be an inspiration to his family,neighbours,I am truly inspired by Sachin's commitment and dedication towards the game for 24 years.Isn't it wonderful.
             In our life we normally fail to experience even a few people but Sachin Tendulkar is someone who has inspired a millions and whose story will inspire millions in the future as well.I recommend anyone who is interested in cricket to just go through the stats of Sachin Tendulkar which will definitely be an inspiration and helps you become more passionate towards the game.
              "BE DEDICATED<BE COMMITTED<BE INSPIRED."

Monday, 18 November 2013

Have a strong WILL POWER.

               Having a strong will power will have a very brilliant effect on whatever you do.Will power is not something which can be bought or gained.It has to be developed from inside,from your subconscious mind.Everyone would have come across this proverb that "Where there is a will,there is a way."It is very true and all of us would have experienced it many times in our lifetime.
              Don't you think when you have a will to do something you will definitely do it than compared to when you don't have a will to do that particular thing.If you have that will to be the topper of the class,you will definitely become one.If you have the will power to become a great leader,you definitely will become one.Developing a strong will power is essential to succeed in life.
              Life is about living and winning.So in order to live life as a winner,you need to win always.It's not enough if you only have the will to win,you need to have the will to prepare to win.It's very common that everyone wants to win or has the will to win but very few have the will to prepare to win and the ones who do are the ones who WIN always.
              So develop a strong will power and mainly the will to prepare to WIN.This will make you a true WINNER of Life.