我需要实现C.巴特沃斯滤波器是很容易得到一个库使用这一功能或写code? [英] i need to implement a Butterworth filter in C. Is it easier get a library with this functionality or write the code?

查看:145
本文介绍了我需要实现C.巴特沃斯滤波器是很容易得到一个库使用这一功能或写code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是在C,$ C $个cblocks是我的IDE和i'm在Windows Vista上运行。我需要巴特沃斯滤波器应用到我的数据。我可以用Matlab自动做到这一点,因为它有这个(或其他)滤波器作为内置函数。计算机和编程地图无法正是我区和我从来没有进口的一个新的图书馆,以及不知道如何做到这一点。是否复杂?而且那会是什么最好怎么办?写code为巴特沃斯滤波器的函数吗?或进口一库为我做到这一点? (个人,如果心不是那么复杂,i'de preFER得到一个图书馆,因为它很可能有其他类型的过滤器,我可以也测试)

My project is in C, CodeBlocks is my IDE and i´m running on windows Vista. I need to apply a Butterworth Filter to my data. I could do this automatically with Matlab as it had this (and other) Filter as a built in function. Computers and programming aren´t exactly my area and i have never "imported" a new library, and dont know how to do this. Is it complicated? and what would it be best I do? write the code for the Butterworth Filter as a function? or "import" a library to do this for me? (personally, if isnt that complicated, i´de prefer to get a library because it would probably have other types of filters i could also test)

推荐答案

这是几乎可以肯定简单和更安全的使用行之有效的外部库(假设你可以找到一个....尝试谷歌吗?)不是codeA非平凡过滤自己。

It is almost certainly simpler and safer to use a well tested external library (assuming you can find one....tried Google yet?) than to code a non-trivial filter yourself.

不过,因为你还没有说你的应用程序,你的数据格式等什么,没有多一点,我们可以告诉你。

But, since you haven't said anything about you application, the format of you data, etc, there is little more that we can tell you.


我不知道你的IDE($ C $个cblocks)是如何工作的任何事情,但通常进口的需要取决于三种形式之一怎样库提供给你(详情后):

I don't know anything about how your IDE (CodeBlocks) works, but importing usual takes one of three forms depending on how the library is made available to you (details to follow):


  1. 您获取源$ C ​​$ C 为一个或多个功能(希望有很好的文档):阅读文档中,code复制到相应的目录,将文件添加到项目,试图编译,修复丢失preprocessor符号等...

  2. 您获得您的平台纯二进制库和头文件(可能是您的操作系统软件包管理系统):阅读文档,告诉IDE在哪里可以找到头文件和库,尝试链接,解决问题...

  3. 您获得一个框架,它提供的功能:这是一个有点麻烦,但它也开始与阅读文档,那么很可能继续像很多图书馆的情况下,但更多的$ C要写入$ C ...

  1. You obtain source code for one or more functions (hopefully with good documentation): Read the docs, copy the code into the appropriate directory, add the files to the project, attempt to compile, fix missing preprocessor symbols, etc...
  2. You obtain a plain binary library and headers for you platform (possibly from you OS package management system): Read the docs, tell the IDE where to find the headers and the library, attempt to link, fix problems...
  3. You obtain a framework that provides the functionality: This is a bit more trouble, but it also starts with read the docs, then probably proceeds a lot like the library case, but with more code to be written...

在任何情况下,你会在某个时刻做

In any case you will at some point be doing

#include "library.h"

在一些源文件,使外部功能可见你的code。

in some of your source files to make the external functionality visible to your code.

也许你想先找到一个候选库,看什么形式,它提供的,那么阅读更多关于你的IDE看到你从那里。

Probably you want to find a candidate library first, to see what form it is provided in, then read more about your IDE to see where you go from there.


另一个太问题,可能是满足您的要求:<一href=\"http://stackoverflow.com/questions/607297/analog-circuit-simulation-library\">http://stackoverflow.com/questions/607297/analog-circuit-simulation-library.

Another SO question that might be relevant to your needs: http://stackoverflow.com/questions/607297/analog-circuit-simulation-library.


它已经,因为我用MATLAB很长一段时间,但如果这是你的基础编程经验,你应该知道,还有的一个是MATLAB提供给您的设施的大量的不在平原香草℃。你几乎肯定要使用一些框架或其他给你一些支持了。

It's been a long time since I used matlab, but if that is your base programming experience, you should be aware that there are a lot of facility that matlab provided to you that are not in plain vanilla c. You almost certainly want to use some framework or another to give you some of that support back.

这篇关于我需要实现C.巴特沃斯滤波器是很容易得到一个库使用这一功能或写code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆