Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Post Run MATLAB through PHP script

    I want to execute a MATLAB .m file through PHP code.
    is it possible??if yes then how???
    Thank YOu
    Shiza

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Nothing built in from what I can see. If you can execute it on the command line, you can use an exec or system call to execute it externally and pull the results.
    See this page for more information: http://ca2.php.net/manual/en/book.exec.php

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,455
    Thanks
    8
    Thanked 1,084 Times in 1,075 Posts
    You could use the slow, poor man's way ....

    Matlab writes data to file, PHP reads the data from file ... and the other way around.
    Maybe an XML or CSV file? If data doesn't have to be shared too often.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •