Error using erf

Dear Prof. Pfeifer,

I am getting some error messages when I run my code related to ‘error using erf’. Please find attached my file. The run.m file is the relevant file to run. If you please run this, you will see the error messages. Although the error message highlights the line of code generating the problem, it is not clear to me exactly what term in the equation is responsible.

I would also like to mention that the run.m file can generate output for two types of economies. I am only having problem with one of these economies which the file is currently set to.
Line 29 in the run.m file in where you set the type of economy you want results for. At present, line 29 of the run.m has the following code: pmrI = 1; fcI = 1; ubI = 1;. This is the economy for which I am getting the error messages. To set it to the other economy would be to set these variables to zero, i.e. pmrI = 0; fcI = 0; ubI = 0;
If you do this and run the file, there is no error. I would appreciate it if you could explain to me why the first generates a problem but not the second and whether there is anything I can do about it.

Many thanks.
Forum 23_06.zip (117 KB)

I am getting

[quote]Error using load
Unable to read file ‘steadyInitial’. No such file or directory.

Error in calibration_solver (line 59)
load steadyInitial;[/quote]

Dear Prof. Pfeifer

I am not sure what is going on. I also get similar error messages when I download these files (which work fine on my Windows 7 desktop) onto my MacBook and try to run it. I am still trying to figure out why that is. But my initial suspicion was operating system differences, which I am now beginning to doubt.

If you look in the folder I sent you, there is a ‘steadyInitial’ file in there so I don’t understand why it can’t be read. The MATLAB Version on both my systems is 9.0.0.341360 (R2016a)

Do you have any idea what the problem might be so I can correct it and get your input on the error messages I am getting? I would greatly appreciate it.

You have a delete statement in your run-file that deletes all mat-files. That seems to be the reason. If I comment that out, the file runs.

Many thanks Prof. Pfeifer!

Can I ask whether you have been able to have a look at the first issue to do with the ‘error using erf’?

Thanks in advance.

Can you please post the full error message as I did not get any.

Dear Prof. Pfeifer,

Thanks a lot. It all works properly once I remove the delete statement.

Many thanks!

Glad to hear that it works.