I am trying to build the frontend for my app using HTML and CSS. I have IIS installed and am sending a request to a PHP script that needs to execute a Matlab code.
What the problem is?
I can not succesfully execute the Matlab code. I woud prefer to run the code through CMD.
What I've tried?
I've tried the following
(A)
exec(matlab -nodisplay -nojvm -logfile out.txt -r "[matlabfilename]; quit;");
Result: nothing happens, what I expect to see is the output of matlab program in out.txt. Out.txt contains the output of the program if I execute the above code on cmd but if I use the link in the web browser it becomes empty
(B) I've made a batch file of the cmd command that works and used
system("cmd /c C:\inetpub\wwwroot\beServer\prog.bat");
where prog.bat contains
matlab -nodisplay -logfile out.txt -r "main; quit;"
I've copied all matlab files I want to execute to C:\inetpub\wwwroot\beServer
Result:I see C:\inetpub\wwwroot\beServer>matlab -nodisplay -logfile out.txt -r "main; quit;" in the web browser but no changes in out.txt