how to link the c code functions during code generation

1 回表示 (過去 30 日間)
vinod naidu
vinod naidu 2016 年 6 月 9 日
編集済み: vinod naidu 2016 年 6 月 10 日
hi every one , my project is finding the peaks of the audio signals in frequency domain at certain threshold I have used CWTFT then i got the result and i can find out the peaks of my audio signals ,
now i got stuck at code conversion for supporting hardware package arduino uno, The few code lines from my programm
for example
s=[50:0.05:68]; scales selection
f0=scal2frq(s,'morl',dt); % function convert the corresponding scales to freq's
scales = helperCWTTimeFreqVector(15000,22050,f0,dt,32);
when I am trying to convert matlab code to c code error shows floor & ceil not supported for code gen floor & ceil are from below mat fun at minscale maxscale
function scales = helperCWTTimeFreqVector(minfreq,maxfreq,f0,dt,NumVoices)
a0 = 2^(1/NumVoices);
minscale = f0/(maxfreq*dt);
maxscale = f0/(minfreq*dt);
minscale = floor(NumVoices*log2(minscale));
maxscale = ceil(NumVoices*log2(maxscale));
scales = a0.^(minscale:maxscale).*dt;
as i know floor and ceil are used to rounds the nearest values, when i searched i got implemented c files for floor and ceil , how would i link these c files during code generation

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by