Not enough input arguments

Dear All,
Please, help me with following problem. I can't run the DSGE model (the code is from author) in Matlab. Attached the code.
COEF_NCC_RED
Not enough input arguments.
Error in COEF_NCC_RED (line 7)
aa = subs(eq,{'k_t','m_t','c_t','l_t','z_t','u_t','v_t'},{1,0,0,0,0,0,0});

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 5월 14일
편집: Ameer Hamza 2020년 5월 14일

0 개 추천

COEF_NCC_RED is just a function definition. You need to define an equation 'eq' before calling COEF_NCC_RED. For example, run the following lines
syms k_t m_t c_t l_t z_t u_t v_t
eq = k_t+m_t+c_t+l_t+z_t+u_t+v_t;
COEF_NCC_RED(eq)
paste these lines in a new script file and run it. COEF_NCC_RED should be on MATLAB's path (e.g., in the same MATLAB folder).

댓글 수: 4

ninu
ninu 2020년 5월 15일
Ameer, thank you very much. This problem occured when I did your recomandation:
COEF_NCC_RED(eq)
Error using ==
Not enough input arguments.
Ameer Hamza
Ameer Hamza 2020년 5월 15일
How are you running this function? Have you created a new script, pasted my code, and tried to run it? Also, can you give the complete error message? Everything in the red text.
ninu
ninu 2020년 5월 15일
Yes, I created a new script and after I tried to run it .
This was the red text:
Error using ==
Not enough input arguments.
I runned just this section in the new script:
syms k_t m_t c_t l_t z_t u_t v_t
eq = k_t+m_t+c_t+l_t+z_t+u_t+v_t;
COEF_NCC_RED(eq)
Ameer Hamza
Ameer Hamza 2020년 5월 15일
This error does not make much sense with this code. Instead of creating a section, first, try to run this code as a separate file.

이 질문은 마감되었습니다.

태그

질문:

2020년 5월 14일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by