smoothing out a matrix
显示 更早的评论
I have a bathymetry data set in a 100 x 100 matrix.
What function do I use to smooth out the data? I want to use a Gaussian filter, however this is not essential.
Thank you!
回答(4 个)
Daniel Shub
2011-9-5
It really should be
doc filter2
doc fspecial
Yes you need two matrices. The first matrix is the data (i.e., your 100x100 matrix A) the second is your Gaussian filter h. You can make this filter with:
h = fspecial('gaussian');
y = filter2(h, A);
Image Analyst
2011-9-6
0 个投票
You can use conv2() which is for 2D arrays and images, instead of conv() which is just for 1D signals.
David Young
2011-9-6
0 个投票
See my answer to this question. The fact that you have bathymetry data rather than an image makes no difference.
类别
在 帮助中心 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!