Number of ACF lags must be a scalar

7 views (last 30 days)
Xin Shen
Xin Shen on 27 Dec 2018
Commented: Stephan on 29 Dec 2018
Hi there,
I have one basic question just it has been bothering me for a day. This is the code:
Table=readtable('rGDP.csv');
gdpacf = autocorr(Table.GDP,'NumLags',10);
run it and I keep getting the error msg:
Error using autocorr (line 99)
Number of ACF lags must be a scalar.
Error in test (line 3)
gdpacf = autocorr(Table.GDP,'NumLags',10);
If instead I run gdpacf = autocorr(Table.GDP), everything's fine. So what's wrong with 'NumLags',10 ?
Thanks a lot.
  2 Comments
Stephan
Stephan on 27 Dec 2018
Which release do you use?
Xin Shen
Xin Shen on 27 Dec 2018
Edited: Xin Shen on 29 Dec 2018
R2017a, if that's what you are asking?

Sign in to comment.

Accepted Answer

Stephan
Stephan on 27 Dec 2018
Hi,
try:
Table=readtable('rGDP.csv');
gdpacf = autocorr(Table.GDP,10);
Best regards
Stephan
  4 Comments
Xin Shen
Xin Shen on 29 Dec 2018
Edited: Xin Shen on 29 Dec 2018
Worked. Just realize that version difference can be this significant. Will pay attention going forward. Tks!

Sign in to comment.

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Tags

Products


Release

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!