brian-lau / MatlabStan

Matlab interface to Stan, a package for Bayesian inference
BSD 3-Clause "New" or "Revised" License
79 stars 47 forks source link

Remove dependence on Statistics or Finance toolbox #52

Open peclayson opened 5 years ago

peclayson commented 5 years ago

Hi,

I noticed that in StanFit.m, the nansum function is used on lines 272 and 366. nansum is a function in the Statistics toolbox and in the finance toolbox.

nansum can be replaced with sum(x,'omitnan'), which would circumvent the user needing the two abovementioned toolboxes and serves the same purpose as nansum. I can't find any other functions that require the toolboxes in the MatlabStan scripts.

I know most people probably have one of these toolboxes, but it might make life easier on a few.

Hope it helps :) Peter

JoKeyser commented 6 months ago

This issue has also been raised in issue #48 .