|
|
| File Information |
| Description |
MOVING will compute moving averages of order n (best taken as odd)
Usage: y=moving(x,n[,fun])
where x is the input vector (or matrix) to be smoothed.
m is number of points to average over (best odd, but even works)
y is output vector of same length as x
fun (optional) is a custom function rather than moving averages
Note:if x is a matrix then the smoothing will be done 'vertically'.
Example:
x=randn(300,1);
plot(x,'g.');
hold on;
plot(moving(x,7),'k');
plot(moving(x,7,'median'),'r');
plot(moving(x,7,@(x)max(x)),'b');
legend('x','7pt moving mean','7pt moving median','7pt moving max','location','best') |
| MATLAB release |
MATLAB 7 (R14)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (11) |
| 03 Oct 2005 |
N. Schneebly
|
|
|
| 06 Oct 2005 |
Aslak Grinsted
|
|
|
| 22 Feb 2006 |
kývanç kýlýç
|
|
|
| 01 Mar 2006 |
Aslak Grinsted
|
|
|
| 21 Jun 2006 |
Felix Jose
|
|
|
| 31 Aug 2006 |
Matteo De Felice
|
|
|
| 21 Feb 2007 |
Johannes Driessen
|
|
|
| 21 Feb 2007 |
Johannes Driessen
|
|
|
| 07 Jul 2008 |
Aslak Grinsted
|
|
|
| 27 Jul 2008 |
P. Strömholm
|
|
|
| 22 Jul 2009 |
Daniel Høyer Iversen
|
|
|
| Updates |
| 07 Jul 2008 |
Made more flexible and more robust. |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com