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개)

bym
bym 2011년 9월 5일

0 개 추천

doc conv()

댓글 수: 2

philippa
philippa 2011년 9월 5일
conv doesnt work because i need 2 input vectors, u and v.
I only a matrix, A. Any suggestions?
philippa
philippa 2011년 9월 5일
Meant to say..
I only have a matrix, A.

댓글을 달려면 로그인하십시오.

Daniel Shub
Daniel Shub 2011년 9월 5일

0 개 추천

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
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
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.

태그

질문:

2011년 9월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by