% Generate sample data.
vector = 5*(1+cosd(1:3:180)) + 2 * rand(1, 60);
plot(vector, 'r-', 'linewidth', 3);
set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
% Construct blurring window.
windowWidth = int16(5);
halfWidth = windowWidth / 2
gaussFilter = gausswin(5)
gaussFilter = gaussFilter / sum(gaussFilter); % Normalize.
% Do the blur.
smoothedVector = conv(vector, gaussFilter)
% plot it.
hold on;
plot(smoothedVector(halfWidth:end-halfWidth), 'b-', 'linewidth', 3);
The window width and the "spread" of the Gaussian are independent of
each other. You can set up whatever window width you want, and
calculate a Gaussian with whatever variance you want inside that. I
simple used guasswin() because it was a convenient built-in function,
but you could of course make one up yourself.
-ImageAnalyst