Matlabstan Problem getting stan version

Operating System: Windows 10, MATLAB R2017a
Interface Version: MatlabStan-2.15.1.0, cmdstan v2.22.1
Compiler/Toolkit:mingw64

Hello,

I have the same problem like stated out here:

I am also trying to run the 8 schools example.

Error message:
Having a problem getting stan version.
This is likely a problem with Java running out of file descriptors
Trying again.
Trying again.
Trying again.
Trying again.
Trying again.
Trying again.
Giving up.
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set 'UniformOutput' to false.

Error in StanModel/stan_version (line 850)
            ver = cellfun(@str2num,regexp(str{3},'\.','split'));

Error in StanModel (line 196)
               ver = self.stan_version();

Error in stan (line 108)
   model = StanModel();

Error in test (line 32)
fit = stan('model_code',schools_code,'data',schools_dat);

There are no space in the path and processmanager seems to work.
Also trying to run the bernoullli example from cmd works fine.

Hardcoding like here:

with ver=‘2.22.1’
gives me the following Error message:

Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set 'UniformOutput' to false.

Error in StanModel/stan_version (line 850)
            ver = cellfun(@str2num,regexp(str{3},'\.','split'));

Error in StanFit/print (line 318)
         if mstan.check_ver(self.model.stan_version,'2.8.0')

If you have any further suggestions to solve this issue I would be very grateful.

Thanks!

1 Like

Sorry to hear you are having problems. This might be a bug in MatlabStan. Since MatlabStan seems to not be actively maintained, you either have to hunt the bug down yourself or try using older version of CmdStan with Matlab (as MatlabStan was last updated 3 years ago).

Also tagging @brian-lau who is the developer, if he has time to look into this.