4

I've an already running instance of matlab and I want execute my matlab project from the same instance of matlab rather than opening a separate instance. Actually I need to have faster processing of matlab and this frequent opening makes it slow. How to I do that?.

I'm calling matlab from PHP:

$command = "matlab  -nojvm -nodesktop -nodisplay -r \"Preprocess('$photo_upload_path','$processed_photo_output_path');exit\"";
exec($command);

I'm using a windows machine.

srccode
  • 721
  • 4
  • 16

1 Answers1

0

The answer to this question essentially covers your question. It seems that the MATLAB COM Automation Server is the designated way to go, or you may have more success with MATLAB's Python engine. However, the accepted answer shows a less fancy but probably much easier and useful alternative (i.e., run an instance of MATLAB that keeps looking for text files that tell it what code to execute). In PHP you'd then just need file operations to check results.

Community
  • 1
  • 1
Tom
  • 2,674
  • 1
  • 25
  • 33