what is the difference between mean and filter function in matlab?
2 次查看(过去 30 天)
显示 更早的评论
i am trying to apply moving average filter to incoming data from the serial port(real time). i referred to some tutorial, their they implemented mean function
taps = 3;
buf_len = 100;
gxdataFilt = zeros(buf_len,1);
[gx,gy,gz] = readAcc(accelerometer);
gxdata = [gxdata(2:end); gx];
gxdataFilt = [gxdataFilt(2:end) ; mean(gxdata(buf_len : -1 : buf_len-taps +1))];
in order to have moving average filter can i replace "mean" with "filter" function, with proper arguments?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filter Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!