getting the PID from matlab
I need the pid to know if one of the many simulations I run are still running. There's no native solution in matlab to my knowledge.
Warning
This post is certainly obsolete...
using hint @ http://www.mathworks.cn/matlabcentral/newsreader/view_thread/268529

create
getpid.c
with1 #include "mex.h" 2 #include <unistd.h> 3 mexFunction(int nlhs, mxArray *plhs[ ], int nrhs, const mxArray *prhs[ ]) 4 { 5 plhs[0] = mxCreateDoubleScalar((double) getpid()); 6 }
compile with
mex getpid.c
use in matlab as
pid = getpid()
this is part of the package in SparseHebbianLearning