Code covered by the BSD License  

Highlights from
Vectorized Adaptive noise canceler using LMS filter

image thumbnail

Vectorized Adaptive noise canceler using LMS filter

by

Kiran Kintali (view profile)

 

07 Sep 2007 (Updated )

This demo shows to call external functions in an Embedded MATLAB block

tapped_delay_fcn(input)
function tap_delay = tapped_delay_fcn(input)
% The Tapped Delay function delays its input by the specified number 
% of sample periods, and outputs all the delayed versions in a vector
% form. The output includes current input

% NOTE: To instruct Embedded MATLAB to compile an external function, 
% add the following compilation directive or pragma to the function code
%#eml

persistent u_d;
if isempty(u_d)
    u_d = fi(zeros(1,40), numerictype(input), fimath(input));
end


u_d = [u_d(2:40), input];

tap_delay = u_d;

Contact us