Smoothing a 2d matrix

5 次查看(过去 30 天)
Haythem Zouabi
Haythem Zouabi 2020-11-11
回答: Sibi 2020-12-17
Hello,
I have a 2d matrix. I need to smooth this matrix by filtering small gradient and keep the highest gradient?
Thanks,

回答(1 个)

Sibi
Sibi 2020-12-17
x=randi(10,2,3);
c = smooth(x(:));
y= reshape(c,height(x),width(x))

Community Treasure Hunt

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

Start Hunting!

Translated by