Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > How to implement Matlab fir1 function in C?

Reply
Thread Tools

How to implement Matlab fir1 function in C?

 
 
Jedora
Guest
Posts: n/a
 
      05-28-2007
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.

 
Reply With Quote
 
 
 
 
Barry Schwarz
Guest
Posts: n/a
 
      05-28-2007
On 28 May 2007 07:56:34 -0700, Jedora <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
wwwkumar@gmail.com
Guest
Posts: n/a
 
      05-30-2007
Hi Jedora,

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

regards,
Shanu

 
Reply With Quote
 
Jedora
Guest
Posts: n/a
 
      06-08-2007
On 5 30 , 6 46 , (E-Mail Removed) 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
vectorized computation in C++ such as those in Matlab (Matlab toC++)? Luna Moon C++ 16 08-08-2008 04:27 PM
how to implement matlab's "reshape" etc David d'Angers C Programming 1 10-16-2007 03:00 PM
Eclipse RCP and MATLAB (calling MATLAB from JAVA) siki Java 0 01-16-2007 04:19 AM
on variadic function in C when porting matlab files to C dd C Programming 2 03-28-2006 02:38 PM



Advertisments