I installed the MatlabStan18.104.22.168 on my matlab 2018b under windows10 64bits.
I had installed the cmdstan under cygwin. MatlabProcessManager was installed and set to path too.
I tried to run the example " …\Examples\rats" but failed. The error is
Having a problem getting stan version.
This is likely a problem with Java running out of file descriptors
Output argument “ver” (and maybe others) not assigned during call to “StanModel/stan_version”.
Error in StanModel (line 196)
ver = self.stan_version();
Error in stan (line 108)
model = StanModel();
Error in rats (line 20)
fit = stan(‘file’,‘rats.stan’,‘data’,rats_dat,‘verbose’,true);"
At first, I thought it is because the MatlabProcessManager. I tried different version of MatlabProcessManager, but I got the same errors. Then I thought the problem is just getting the version of stan in matlab. So I change my directory to
...\cmdstan\bin, and run the below command:
" [status,cmdout] = system(‘stanc.exe --version’)"
" status = -1.0737e+09
cmdout =0×0 empty char array"
I seems that the system command failed with a return value not 0. To exclude the cmdstan reason, I have tried to run the same command in cygwin,
where I make and build stan. It gets the version successfully.
“stanc version 2.3.0”
Besides, I run the same command under CMD in windows10. After adding the cygwin path to the enviroment path, it succeeds again. Now I am very confused in the Matlab. How could I run the stanc.exe to get the version? I really need help and suggestions.