473,467 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Interfacing PHP/Perl with MATLAB

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
Aug 28 '06 #1
2 12519
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

Aug 29 '06 #2
NC
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...
You should consider writing a custom PHP extension for that. MATLAB
has a C interface:

http://www.mathworks.com/access/help...echdoc/apiref/

You can use this interface to write a PHP extension in C to make a
bridge between PHP and Matlab.

Cheers,
NC

Aug 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
by: Fred Ma | last post by:
Hello, This is not a troll posting, and I've refrained from asking because I've seen similar threads get all nitter-nattery. But I really want to make a decision on how best to invest my time....
4
by: dataangel | last post by:
I'm a student who's considering doing a project for a Machine Learning class on pathing (bots learning to run through a maze). The language primarily used by the class has been Matlab. I would...
3
by: Mohammed Smadi | last post by:
Hi; Does anyone know if we can call matlab for a python or bash script while feeding the matlab script some command line arguments? I have an interactive matlab script which i want to automate...
6
by: Lars Christiansen | last post by:
Hi! I am a master student in (geo)physics at the University of Copenhagen and part of a study group on C++ as a scientific programming language. I, and the other students in the group, have...
5
by: itsme321 | last post by:
Hi I am from science background and learnt little bit of programming in C,Matlab,C#. My task in hand is to interface an instrument through RS 232. I am using the serialport class but not able to...
4
by: itcecsa | last post by:
Hi, I am implementing a small Python project, what I am going to do is to open Matlab and run some M-files, and get some output from Matlab command prompt. I have no idea how to open Matlab...
1
by: chitralaxman | last post by:
Sir, I'm a M. E (comuter Science and Engineering) Student and now i'm doing my project in Bioinformatics. I'm new to perl & MATLab. I've written the code for neural network simulation in MATLab....
14
by: Luna Moon | last post by:
Dear all, Can C++/STL/Boost do the vectorized calculation as those in Matlab? For example, in the following code, what I really want to do is to send in a vector of u's. All other...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.