Translating matlab functions to c- functions.

조회 수: 1 (최근 30일)
Misha Dabaghyan
Misha Dabaghyan 2015년 8월 17일
답변: Walter Roberson 2015년 8월 17일
Hi, I have a matlab code code that analyzes and conditions some signals in a certain way (filters, etc). I would like to translate the whole procedure into C, to be later compiled into dll's that would be used by a bigger suite of programs. The flow of the program is e.g. "1) take the signal, apply a filter, add/subtract something to/from the result of the filter, down-sample, pass it down to the differentiation filter etc ...". I was wondering if each of these steps can be turned into separate C-code with the appropriate input-output capabilities (so that I would be able to choose which filters to "plug in"), and if so, what the best strategy would be. Would using the Simulink coder be the best approach, or should I just go with converting the m-files? Thanks.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 8월 17일
Simulink Coder would be appropriate if your data was represented as a Simulink model. If it is not then use MATLAB Coder.
Note: if I recall correctly, the filter design routines cannot be used with MATLAB Coder, but the filter that gets designed can be. Building a general interface that allowed the user to construct new filters would, I suspect, be considered an impermissible duplication of MATLAB functionality that would not be permitted to be compiled by the Terms and Conditions; this would not be an issue if the filter coefficients are already decided and you are applying the filters.

카테고리

Help CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by