IRIS-Solutions-Team / IRIS-Toolbox

[IrisToolbox] for Macroeconomic Modeling
Other
90 stars 41 forks source link

Issue with options in simulate #302

Closed Teodo75 closed 3 years ago

Teodo75 commented 3 years ago

Hello,

after testing the "Five minutes Tutorial", I encountered an error in the "simulate" command/function, exactly in its options, which returns (Matlab R2019b - update 5):

"Error using Model/simulate Invalid input argument list. Too many input arguments. If specifying name-value arguments, ensure that all required inputs are provided, and check for the invalid name.

Error in run_my_model (line 39) s = simulate(m, d, 1:40, 'AppendPresample=', true)"

When using: s = simulate(m, d, 1:40) everything works fine (!), and finishes. - just I am not so sure about the results, as I can not use options to function to "fine-tune" the input-output...

Please, what is the correct syntax for the "simulate" function for options/optional inputs to the function? It is not as mentioned in different tutorials, and in different formats.

Thank You in advance for Your answer.

BR, Teodo

jaromir-benes commented 3 years ago

Hi Teodor

Because of some recent changes in the Matlab language, you now need to use the names of the options without the equal sign - either of the following will work

s = simulate(m, d, 1:40, 'appendPresample', true)
s = simulate(m, d, 1:40, "appendPresample", true)

Also, starting from Matlab R2021a, you can use a new, much more convenient, syntax that involves again the equal sign but removes the quotes and commas (the previous syntax is still valid as well)

s = simulate(m, d, 1:40, appendPresample=true)

Finally, note that the new name for the option has changed to prependInput (instead of appendPresample), see

>> type Model/simulate.md
>> web Model/simulate.md

Hope this help Best Jaromir

Teodo75 commented 3 years ago

Dear Mr. Jaromir,

Thank You very much for Your answer, and Your help! I really do appreciate it. As well, Thank You for the, more than, prompt and detailed reply.

I am sorry I didn't reply to You earlier - today, but had many work obligations...

The inputs: s = simulate(m, d, 1:40, 'appendPresample', true) % doesn't work... s = simulate(m, d, 1:40, "appendPresample", true)% doesn't work... and: s = simulate(m, d, 1:40, appendPresample=true)% doesn't work... does not work. I don't know why ... , as it all seems logical and well defined, but I tried it.

As well, Thank You for noting to me the change of the name of the option, and the "command" part 'prependInput': s = simulate(m, d, 1:40, 'prependInput', true) % working great! This syntax works flawlessly (!).

I was before working in Dynare - for some interests..., but I really think that IRIS is much more user-friendly and intuitive, and will recommend it at the academic circle that I know/meet.

Great compliments, and respect, for the GREAT toolbox You developed, as to other contributors.

Thank You, once again, for the help and swift reply.

Wish You all the best in Your future life and work.

Best regards, Teodo

jaromir-benes commented 3 years ago

Thank you, Teodo, for your appreciation. Let me know if you have any further questions/issues. Best, Jaromir

On Thu, Jun 3, 2021 at 9:45 PM Teodo75 @.***> wrote:

Dear Mr. Jaromir,

Thank You very much for Your answer, and Your help! I really do appreciate it. As well, Thank You for the, more than, prompt and detailed reply.

I am sorry I didn't reply to You earlier - today, but had many work obligations...

The inputs: s = simulate(m, d, 1:40, 'appendPresample', true) % doesn't work... s = simulate(m, d, 1:40, "appendPresample", true)% doesn't work... and: s = simulate(m, d, 1:40, appendPresample=true)% doesn't work... does not work. I don't know why ... , as it all seems logical and well defined, but I tried it.

As well, Thank You for noting to me the change of the name of the option, and the "command" part 'prependInput': s = simulate(m, d, 1:40, 'prependInput', true) % working great! This syntax works flawlessly (!).

I was before working in Dynare - for some interests..., but I really think that IRIS is much more user-friendly and intuitive, and will recommend it at the academic circle that I know/meet.

Great compliments, and respect, for the GREAT toolbox You developed, as to other contributors.

Thank You, once again, for the help and swift reply.

Wish You all the best in Your future life and work.

Best regards, Teodo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/302#issuecomment-854131227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKT2KW7DBI47BNFPW2TTQ7LW7ANCNFSM45767CCQ .