A code snippet:
% Input data
X = dY;
% BIC cost for different combinations of p and q
bic = zeros(2,2);
for p = 1:2
for q = 1:2
[theta,~,logl,~] = arma(X,p,q,0);
k = (p+q+1)*numel(X);
bic(p,q) = -2*logl + k*log(numel(X));
end
end
After running the program, it shows the message:
"Unrecognized function or variable 'arma'."
What could be the cause of this problem?

 채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 4월 26일
이동: Image Analyst 2023년 4월 26일

0 개 추천

Given the syntax used, arma is a function, but it is not an inbuilt function.
Do you have a function defined as arma? If yes, is it in the current directory? If no, well, then you need to define arma(), before using it.

댓글 수: 4

Walter Roberson
Walter Roberson 2023년 4월 26일
Mathworks does not provide a function named arma. It has various ARMA related functions in the Econometrics toolbox and the System Identification toolbox, including a function named arima(), but none named arma()
Michal Kalowski
Michal Kalowski 2023년 4월 26일
ok i changed to arima() functions but now i get Too many output arguments error. not quite, I know why as I also have 4 arguments in the input?
Dyuman Joshi
Dyuman Joshi 2023년 4월 26일
Which arima? There are 2 such functions arima and arima. Which one did you use? None of the these functions provide 4 outputs as used in the above code (and thus the error).
It seems that you have copied this code from somewhere, which used a user-defined function called arma, which was not provided with the code.
Michal Kalowski
Michal Kalowski 2023년 4월 27일
thanks for the help

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Conditional Mean Models에 대해 자세히 알아보기

제품

릴리스

R2020b

태그

질문:

2023년 4월 26일

댓글:

2023년 4월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by