473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to implement Matlab fir1 function in C?

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
3 7444
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: tsjuan | last post by:
Hello Python Users, I've been trying to run multiple thread of Matlab by calling its com object via python. However, I keep getting error message that says Python can't find the attribute of...
10
by: Chao | last post by:
I've been trying to develop some numerical codes with python, however got disappointed. A very simple test, a = 1.0 for i in range(1000): for j in range(1000): a = a+1
3
by: Ajith Menon | last post by:
Do any body know how to use the functions available in the MATLAB using C#? ( To be specific, functions COHERE used to find Coherence and TFE to calculate Transfer function are needed. These...
2
by: zipls | last post by:
suppose a simple matlab function //add.m function result=add(left,right) result=left + right; //end of add.m use matlab comtool to encapsulate the function in fun.dll and then use it in...
2
by: eric_jin | last post by:
i called function show() in a c# webservice //show.m function ans=show(x) ans=x; it works; but when i try to call add(),it breaks; //add.m
1
by: santus | last post by:
Hello, I've just join this forum and i need help about using matlab function from .net. I need to make a program to plot data into 2D graphics and the program use use mathematics functions. ...
4
by: itcecsa | last post by:
Hi, I am implementing a small Python project, what I am going to do is to open Matlab and run some M-files, and get some output from Matlab command prompt. I have no idea how to open Matlab...
1
by: sanctus | last post by:
I have a Matlab code which works fine in windows. Now I installed Xubuntu (because this way I have admin rights(=root) which I don't have on windows) and want to use the same code. To be able to...
14
by: Luna Moon | last post by:
Dear all, Can C++/STL/Boost do the vectorized calculation as those in Matlab? For example, in the following code, what I really want to do is to send in a vector of u's. All other...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.