By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,513 Members | 1,689 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,513 IT Pros & Developers. It's quick & easy.

How to implement Matlab fir1 function in C?

P: n/a
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.

May 28 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 28 May 2007 07:56:34 -0700, Jedora <je****@gmail.comwrote:
>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
May 28 '07 #2

P: n/a
Hi Jedora,

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

regards,
Shanu

May 30 '07 #3

P: n/a
On 5 30 , 6 46 , wwwku...@gmail.com wrote:
Hi Jedora,

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

regards,
Shanu
Hi Shanu,

You may find the answer on my blog:
http://xxshi.blogspot.com/2007/06/fi...tlab-to-c.html
or
http://xxshi.blogspot.com

Thanks.

Jedora.

Jun 8 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.