How to stop Stan processing in MATLABStan?

Operating System: Windows
Interface Version: MATLABStan

Hi, is it possible to stop Stan within MATLAB once it has started? I understand there is a kill process in RStan but is there the same thing in MATLAB?

Thanks :)

I’ve never actually used MatlabStan so I’m not sure. Anyone else know? (I think @avehtari and @brian-lau are the only two developers that are very familiar with MatlabStan)

I don’t think there’s anything special in RStan for this, we just rely on either the stop button in rstudio or cntrl c from the terminal.

How do you normally stop something in Matlab? MatlabStan just wraps CmdStan so maybe command line commands will work.

And welcome to the Stan forums!

Thanks for the welcome :). I normally stop processes in MATLAB with ctrl-c but this seems to be running in the background and I can’t see how to stop it. It may be to do with how the actual script was written that calls Stan - I’m talking to the coder later so if I find out I’ll update this thread. Thanks for taking the time to reply :)

One way to stop the process is to kill it from Task Manager (ctrl + shift + esc). At least this works with Python.

You can use the stop method of the StanFit object. e.g. StanFitObject.stop()


Yes that works, thank you :)

Perfect - yes that works! Thankyou I thought there must be a way to do it from MATLAB :)