Error: Invalid use of operator

Hi all,
I am a beginner in Dynare, trying to reproduce the codes for “Monetary Policy Transmission in China”. The mod file seemed to work to generate some m files but then Matlab showed:

“Error: File: rep_ls.m Line: 466 Column: 1
Invalid use of operator.
Error in dynare (line 223)
evalin(‘base’,fname) ;”.

And I checked, there’s a line of “********************” somehow in the m file. I am so confused and google couldn’t help…

Can anyone help me figure out what the mistake is?

rep_ls.mod (24.5 KB)

Hi, What is your version of Dynare? Can you send also the generated mod file? I cannot reproduce your error message with the latest stable… But I have a problem with the steady state (probably something wrong with the initial guess).

Best,
Stéphane.

Hi Stephane,
I am using Dynare 4.5.4. Here you can find my generated m file. The problem is in line 466. Could it just be an accidental system error with that line of *******?
rep_lishu.m (27.0 KB)

But also I just tried to delete the line of ******* and run that generated file directly (instead of running the dynare file), and you were right, there’re more problems…

Thanks. I really do not know what can generate this line… Did you try with the latest stable? What is your OS?

Best,
Stéphane.

If you can run the mod without generating that line, at least I know now that could be fixed! Thank you for the suggestion, I will try the latest stable the next. I am using Thinkpad with win10.

Best,
Lishu

Thank you! It works, the line doesn’t show up anymore.
Best,
Lishu