Can I run MATLAB code on a web site?

后端 未结 8 1700
长发绾君心
长发绾君心 2020-12-13 22:16

I have a BE project whose code is in MATLAB but I need to present results on a web page. I want to know whether I can run my code directly on a web site? If not, could you t

8条回答
  •  醉酒成梦
    2020-12-13 22:31

    I use Matlab COM Automation Server via PHP, this runs a method that does some derivations:

    $Matlab = new COM("Matlab.Application.Single");
    
    $output = $Matlab->Execute("addpath '".dirname($_SERVER['SCRIPT_FILENAME'])."/'");
    
    $output = $Matlab->Execute("[roots, dy, subsStr] = NewtonPrep('".$_REQUEST['eq']."')");
    
    echo $output;
    

    https://php.net/manual/en/book.com.php

    https://www.mathworks.com/help/matlab/call-matlab-com-automation-server.html

提交回复
热议问题