Jump to content

How to run program in php(Matlab)


makhan

Recommended Posts

Hi I am trying to run a matlab script.(This script you can run from the command line  by command 'matlab -r scriptname').

 

But when I use this command inside a system or exec I don't get any output, nor does the matlab opens and executes as it does in case of command line..

 

I am doing like

 

<?php

echo exec(' matlab -r scriptname');

?>

Link to comment
Share on other sites

  • 2 years later...

When you run matlab from a command prompt, does it work?  Or does it tell you that matlab is not found?

 

If it tells you matlab is not found you either:

1) Need to specify the absolute path to matlab.exe on your machine when you invoke it

2) Use PHP's putenv() function to modify your environment PATH variable

3) Modify the environment PATH variable for the whole machine

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.