Pregunta

When using the MATLAB Engine interface, how can I get the process ID of the matlab process that is started? Or how can I launch the matlab process in a way that would allow me to also get the PID?

The reason why I need this is to be able to interrupt calculations when they take too long. On *nix systems this seems to work by sending a SIGINT signal to MATLAB. This won't kill MATLAB, but it will interrupt the current calculation.

¿Fue útil?

Solución

Evaluate the following in MATLAB to get the PID:

feature('GetPid')

I found this here.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top