Borrar filtros
Borrar filtros

how to link the c code functions during code generation

1 visualización (últimos 30 días)
vinod naidu
vinod naidu el 9 de Jun. de 2016
Editada: vinod naidu el 10 de Jun. de 2016
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

Respuestas (0)

Categorías

Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by