How to implement Matlab fir1 function in C?

Discussion in 'C Programming' started by Jedora, May 28, 2007.

  1. Jedora

    Jedora Guest

    Hi all,

    In Matlab, we use fir1 function to calculate fir filter coefficients.
    For example,

    fir1(10,0.375)

    Outputs are:
    ans =

    Columns 1 through 10

    -0.0019 -0.0133 -0.0161 0.0766 0.2677 0.3742
    0.2677 0.0766 -0.0161 -0.0133

    Column 11

    -0.0019

    I wonder how it works and how to implement the fir1(n, wn) function in
    C programming language.
    Thanks a lot!
    Please help!

    Jedora.
     
    Jedora, May 28, 2007
    #1
    1. Advertisements

  2. On 28 May 2007 07:56:34 -0700, Jedora <> wrote:

    >Hi all,
    >
    >In Matlab, we use fir1 function to calculate fir filter coefficients.
    >For example,
    >
    >fir1(10,0.375)
    >
    >Outputs are:
    >ans =
    >
    > Columns 1 through 10
    >
    > -0.0019 -0.0133 -0.0161 0.0766 0.2677 0.3742
    >0.2677 0.0766 -0.0161 -0.0133
    >
    > Column 11
    >
    > -0.0019
    >
    >I wonder how it works and how to implement the fir1(n, wn) function in
    >C programming language.


    You probably want to start in a newsgroup that discusses the fir
    algorithm. After you try to implement it, you can come back here with
    your code and ask questions.


    Remove del for email
     
    Barry Schwarz, May 28, 2007
    #2
    1. Advertisements

  3. Jedora

    Guest

    Hi Jedora,

    Were you able to find out the algorithm for Fir1 .. Let me know incase
    you done it.

    regards,
    Shanu
     
    , May 30, 2007
    #3
  4. Jedora

    Jedora Guest

    Jedora, Jun 8, 2007
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Karthikeyan Subramaniyam

    How to implement Random function

    Karthikeyan Subramaniyam, Feb 24, 2006, in forum: VHDL
    Replies:
    2
    Views:
    3,865
    Barry Brown
    Feb 24, 2006
  2. siki
    Replies:
    0
    Views:
    1,240
  3. dd
    Replies:
    2
    Views:
    511
    tmp123
    Mar 28, 2006
  4. Replies:
    4
    Views:
    599
    milhous
    Sep 22, 2006
  5. David d'Angers

    how to implement matlab's "reshape" etc

    David d'Angers, Oct 16, 2007, in forum: C Programming
    Replies:
    1
    Views:
    1,805
  6. xz
    Replies:
    2
    Views:
    532
    James Kanze
    Mar 14, 2008
  7. Luna Moon
    Replies:
    16
    Views:
    1,865
    Giovanni Gherdovich
    Aug 8, 2008
  8. Adam Przybyla

    Re: Call python function from Matlab

    Adam Przybyla, Jun 8, 2011, in forum: Python
    Replies:
    2
    Views:
    1,158
    algoholic
    Jun 4, 2012
Loading...