About mex documents and dynare_simul_

In the directory C:\dynare\4.4.3\mex\matlab, there are many mex files. what are they?

Here is a line of codes, and I do not know whether it relates to mex file dynare_simul_. What does dynare_simul_.mexw64 mean ? Can somebody tell me ? Thank you!

    [err, y_] = dynare_simul_(3,M_.nstatic,M_.npred,M_.nboth,M_.nfwrd,exo_nbr, ...
                              y_(dr.order_var,1),ex_',M_.Sigma_e,options_.DynareRandomStreams.seed,dr.ys(dr.order_var),dr.g_0, ...

mex-files are precompiled files that Matlab (a non-compiled language) can use to speed up computationally intensive tasks. If you want to learn more about those, see de.mathworks.com/help/matlab/matlab_external/introducing-mex-files.html

On the same topic, I am experiencing errors regarding the dynare_simul.m after running model via dynare++

shocks = zeros (2,t)./0;
for i=1:nsimul
sim_results(:,:,i)=dynare_simul(‘model.mat’, shocks);

Invalid MEX-file ‘E:\dynare\4.4.3\mex\matlab\win64-7.3-7.4\dynare_simul_.mexw64’: The specified procedure
could not be found.[/code]

Just to clarify, I did add path with the routines via:

addpath(genpath('E:\dynare\4.4.3\dynare++')) addpath(genpath('E:\dynare\4.4.3\matlab'))

Do you maybe know what the reason might be?
Thanks in advance!

You are missing

addpath('E:\dynare\4.4.3\mex\your system path belongs here')

Thank you very much for your comment. However I am still obtaining the same error, even though I did add the mex folder and subfolders to the matlab paths.
Do you maybe know what may be causing a problem?

My conjecture is that there might be an issue with discrepancies between the versions of compiler used to generate mex files and the one I have installed on my lapot (I have SDK 7.1 © ).Do you maybe know which version was used to create the dynare .mex files?

Second question: I am also using the dynare at the university PC lab, which does not have any mex compiler installed. Do you know if there is any way to avoid calling .mex files with dynare_simul() function?

As long as the mex-files match your Windows system, you should be fine. You don’t need a compiler on Windows.
However, I just recognized that it is a bad idea to use

because this will add a path to all mex-files, i.e. for Octave and all Windows and Matlab versions. Thereby, you will have no control over which one is actually on top of the path. Please identify your system (32 bit vs, 64 bit) and your Matlab version (ver command in Matlab) and set a path to only the subfolder corresponding to your system.

I did what you suggested and now it works !
Thank you very much for your help.

Thank you for your reply.