File Exchange

image thumbnail

smoothn

version 1.0 (3.38 KB) by

Smooths N-D input data using 'box' or 'gaussian' filter using a specified convolution kernel.

5 Downloads

Updated

No License

SMOOTHN Smooth N-D data
Y = SMOOTHN(X, SIZE) smooths input data X. The smoothed data is
retuirned in Y. SIZE sets the size of the convolution kernel
such that LENGTH(SIZE) = NDIMS(X)

Y = SMOOTHN(X, SIZE, FILTER) Filter can be 'gaussian' or 'box' (default)
and determines the convolution kernel.

Y = SMOOTHN(X, SIZE, FILTER, STD) STD is a vector of standard deviations
one for each dimension, when filter is 'gaussian' (default is 0.65)

See also SMOOTH3

(It is an extension of Mathworks' SMOOTH3 from 3 to N dimensions)

Comments and Ratings (11)

dudy karl

wow...hat's off

ogadol

ogadol (view profile)

Hi Anil

Im applying smoothn in order to smooth bathmetric data sets and it works perfectly. I'm using a smooth factor of 10^9 on a 1601X1601 grid. The spacing of the points in realty is 12.5 m. can you please tell me what is the spatial meaning of the smooth factor in my case ?

Thanks

Ogadol

Han

Han (view profile)

y c

GOOD, but gives problems when plotting a 0°-360° longitude contour map.
0° longitude data do not coincide with 360° longitude data.there is a shift of the isolines.

Fco. Camacho

Good. (For the box filter (enough for me) in 1 and 2d i prefer moving_average by Carlos Vargas, it's a ferrari)

Kent Conover

Failed to finish a smooth of a 1000 point vector when run on Mac OS X system with Matlab Version 7.1.0.183 (R14) Service Pack 3.

Psul Griffin

slow, but good results.

Ed Chao

Works like it should and verified to be accurate. Matches the IDL function "SMOOTH". But this function is *slow*. A 1 sec. IDL program takes about 20 seconds with this function.

Zoltan Nadasdy

glacier cao

Good!

Carlos Vargas

MATLAB Release
MATLAB 5.3.1 (R11.1)
Acknowledgements

Inspired: fast running mean

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video