Hi There, How can I calculate a moving average for a column of data. For instance i want to average the 50 points either side of each data point in my column. Thanks
You divide by however many 1's there are in the kernel. If you don't then you're not getting the average. Remember the average is the sum divided by the number of elements in the sum. If you didn't have 101, then you'd simply be summing 101 values and the resulting image would be 101 times as bright rather than in the same intensity range as the original.
Thanks. The filter function is set to average data from the previous n measurements. Is there a simple way to specify a different averaging criteria? Thanks
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/80508-create-a-moving-average#comment_816283
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/80508-create-a-moving-average#comment_816283
Sign in to comment.