Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How do I smooth 2D vector field data?

Asked by AP on 6 Jul 2011

I have a vector field in 2D. How can I smooth the data? I found smooth and smooth3 but it seems there is nothing for 2D. Could someone help me?

0 Comments

AP

Tags

Products

No products are associated with this question.

1 Answer

Answer by David Young on 6 Jul 2011

Split your vector field into components (how to do this depends on how it is stored to start with). Smooth each component separately and reassemble them if necessary.

To smooth a 2-D scalar array, you can use conv2 with a suitable kernel. The choice of kernel depends on how much you want to smooth and what your smoothing requirements are. Typically a Gaussian is a good choice - if you have the Image Processing Toolbox you can use fspecial to get one.

0 Comments

David Young

Contact us