MATLAB: Using emlc to generate C code – function within a function problem

c-code generationembedded matlabemlc

Hello fellow Matlab users,
Ive been trying to convert a massive code from matlab to c and implement it for real time signal processing on a DSP processor.
So far ive been succesfull and emlc is an amazing function! The problem i have reached now is that I need to compile a code that has the function "butter" inside (gives out butterworth filter coefficients.)
The problem is that the compilation report complains about butter`s input arguments are not constant.
To make things a bit more clear:
C_generating_script.m => Function_1.m => butter.m
Now my question is:
How can I define/declare the inputs of the butter function as constants which is within another function and allow it to compile?

Best Answer

Have you tried specifying constant inputs using emlcoder.egc: http://www.mathworks.com/help/toolbox/eml/ug/bq2wkmb-47.html#brl11_g-1