***160

Update: Correction in Matlab code for raised cosine filter

Thanks to the keen observation by Mr. Phan Minh Hoang, I was notified that the Matlab/Octave scripts provided along with the topic raised cosine filtering was not behaving properly.

Reason: I was not taking care of the division by zero when creating the raised cosine filter taps. :(

The equation for raised cosine filter is

where
is the excess bandwidth parameter and takes values from 0 to 1.

I was not taking care of the division by zero in the above equation. I updated the code to explictly handle the division by zero case where:

(a) for and

(b) for

(Thanks to the article in RFDesign.com, The care and feeding of digital, pulse-shaping filter, Ken Gentile)

The updated posts are:

1. Raised cosine filter for transmit pulse shaping

2. Eye diagram with raised cosine filtering

Thanks again Mr. Phan Minh Hoang. :)

All,
In case you find errors and inconsistencies in the article and/or simulation models, kindly let me know.
Regards,
Krishna

Please click here to SUBSCRIBE to newsletter and download the FREE e-Book on probability of error in AWGN. Thanks for visiting! Happy learning.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

If you liked this post, you may leave a comment below, or subscribe to the RSS feed.

You may also find these posts relevant...
  • Eye diagram with raised cosine filtering
  • Raised cosine filter for transmit pulse shaping
  • Interpreting the output of fft() operation in Matlab
  • Gray code to Binary conversion for PSK and PAM
  • Example of Cascaded Integrator Comb filter in Matlab
  • Comments

    hi
    i hope u r doing fine… why dont we do the simulations in c++??? i mean is it possible to simulate QPSK in c++?

    @Jhony:
    Ofcourse, we can do the simulations in C++ (or any most other programming languages). The advantage with Matlab is that it is easier to code and debug compared to C.

    In Matlab, Y = A*B where A and B are matrices is a one-liner.
    Imagine how many lines of code we need to write for the same operation in C?

    can you guide me to a site or some sources from where i can get help for the code written in c++ for digital communication?

    Leave a comment

    (required)

    (required)