1

Good day, I'm new to both Matlab and PHP. I have been trying to run a Matlab script via PHP and have been looking for resources on how to type the path correctly. This is what I've tried thus far and I'd appreciate someone's input.

exec ("C:/Users/toonsiss/Documents/MATLAB/edges/edgeBoxesDemo.m", $output);

S.Toonsi
  • 35
  • 5
  • Possible duplicate of [running matlab code from php](http://stackoverflow.com/questions/15956000/running-matlab-code-from-php) – C.Colden Jul 14 '16 at 12:44
  • Executing the script won’t work. You need to start Matlab and tell it to run the script. See the links in the first comment on how to start Matlab to run a script. Also you don’t want to capture the raw text output, because that’ll include the Matlab header and `>>` prompts. It might be better for your Matlab script to save a data file which PHP then reads. – Ahmed Fasih Jul 14 '16 at 14:20
  • I solved it, php is indeed invoking matlab and running the specified script – S.Toonsi Aug 11 '16 at 09:24

0 Answers0