필터 지우기
필터 지우기

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 CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by