Binod Pant wrote:
Does any one know of a way to call MATLAB from PHP/Perl? I found the Perl
module Math:MATLAB , but it seems not to work on Windows, and it's not
easy to install and use.
This would enable one to use MATLAB to generate live web content...
BP
Hi Binod,
I do not know of a (working) interface, but maybe a few are out there.
I solved this a few year back in the poor mans way: Via files.
(That was not PHP, but C, but the approach is the same.)
Let PHP write a file with instructions/data/whatever, and let Matlab read
it, do its stuff, and write an output file with results.
So:
1) PHP writes a file containing instructions/data.
2) PHP calls Matlab (via functions like passthru() or something similar)
Here is an overview of such functions:
http://nl3.php.net/manual/en/ref.exec.php
3) PHP reads Matlabs outputfile and proceeds.
It is not the fastest way to include Matlabs functionality, but it gets the
job done.
Just my 2 cent...
Regards,
Erwin Moller