Problem with movavg "Not enough input arguments."
Show older comments
Hello I am trying to calculate movavg as:
[lead,lag]=movavg(close,5,30);
I have the following:
Error using movavg (line 7) Not enough input arguments.
So if I try:
[lead,lag]=movavg(close,5,30,0);
I have:
Error using movavg (line 8) This function only supports exponential moving averages
So it only works if I use the following:
[lead,lag]=movavg(close,5,30,'e');
...BUT I want simple moving averages not exponential!!
This is strange since the syntax of the function is the following:
movavg(Asset, Lead, Lag, Alpha) [Short, Long] = movavg(Asset, Lead, Lag, Alpha)
Anybody can help me?
1 Comment
Accepted Answer
More Answers (0)
Categories
Find more on Correlation and Convolution 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!