how to link the c code functions during code generation
Afficher commentaires plus anciens
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
Réponses (0)
Catégories
En savoir plus sur Audio and Video Data dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!