mvaverage - xs = mvaverage(xn,8);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function y=mvaverage(x,N) %MVAVERAGE signal smoothing through the moving average method. % Y = MVAVERAGE(X,N) Quickly smooths the signal X via averaging each % sampling with the previous N samples. % % Example: t = 2*pi*linspace(-1,1); xn = cos(x) + 0.25 - 0.5*rand(size(x));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xs = mvaverage(xn,8); plot(t,xn,t(5:end-4),xs(9:end)), legend('noisy','smooth'), axis tight % % See also MVAVERAGE2 and MVAVERAGEC % by Yi Cao % Cranfield University % 11-09-2007 % % y=filter(ones(1,N)/N,1,x);...
View Full Document

This note was uploaded on 11/01/2011 for the course ANTHRO 5 taught by Professor Gaulin during the Spring '11 term at San Diego.

Ask a homework question - tutors are online