Gaussian filtering of zero-padded and circularized 1-D data

This filter could be extended into a 2D image smoothing filter. The kernel can be switched easily.
349 Downloads
Updated 9 Apr 2012

View License

This is a program to test how a gaussian filter works on a set of 1-D data a
e.g. a=[1 10 1 10 1 10 1] --- use this as input or use your own 1D data
This example uses a gaussian filter extracted from wikipedia:
kernel = [0.125 0.625 1 0.625 0.125] for standard normal distribution
NOTE: you could extend the size of the kernel, but then you will need to change 1). the size of padding with zeros or edge elements 2). the indices of f and 3). the number of offset elements for the filtered
signal.
This filter could be used to compare with the conv function in matlab, but it may give you an intuitive control of your filtering. It could be extended
into a 2D image filter quite easily for image processing.

Cite As

Rex Cheung (2024). Gaussian filtering of zero-padded and circularized 1-D data (https://www.mathworks.com/matlabcentral/fileexchange/36075-gaussian-filtering-of-zero-padded-and-circularized-1-d-data), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0