Is there a robust matlab algorithm for spatial smoothing in all directions?
Show older comments
I got a 2-D matrix of size 360X180 that represent geogrpahical locations (lon,lat). The values in the matrix is probability to find something at that geographical location. I want to smooth that matrix to get better plots. Until now I used matlab's filtfilt function to smooth the data, however I realise that besides the fact that it misses the diagonal adjacent values, it also matters if I choose to run it first alongside the lat or the lon dimension. I searched quite a lot but couldn't find any matlab function that can give me a nice spatial data smoothing that is robust, and also that is a bit more sophisticated algorithmically than just averaging the matrix with neighbouring values. If you have any idea of a matlab function that can achieve this I'd be very happy to know!
2 Comments
Rik
on 4 Oct 2021
You mean like a Gaussian blur? You can use a convolution to do that.
You should note that a 'better plot' is a very subjective goal to work towards. What does that mean exactly? And why do you want something sophisticated?
Walter Roberson
on 4 Oct 2021
Are the matrices equally spaced in latitude, and equally spaced in longitude? Or do they correspond more to physical coordinates (for example, spaced in km instead of minutes of a degree) ?
Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!