How can I call a client-side MATLAB installation from a web page using COM Automation?

1 view (last 30 days)
I would like to create a web page that uses MATLAB as an Automation server. For example, I might have a user make selections in an HTML form and use MATLAB to perform calculations or display graphics.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 3 Aug 2009
This change has been incorporated into the documentation in Release 14 Service Pack 3 (R14SP3). For previous releases, read below for any additional information:
MATLAB can be invoked as an Automation server from any language that supports COM. Both VBScript and JavaScript support COM, so these can be used in a web page to call MATLAB.
Please find the attached 'vbexample.html' file, which provides an example of calling MATLAB from a web page using VBScript.
The example provides the user a pulldown menu to select one of three plot types to generate. When the Plot button is clicked, the code sends a command to be evaluated in the MATLAB server to create the plot figure. A string is also stored in the MATLAB workspace and later retrieved to be placed in the text area of the web page.
In order to view the example, you must have an installation of MATLAB and a web browser that supports VBScript (such as Internet Explorer). You may also have to modify your browser security options in order to use ActiveX. For example, in Internet Explorer, go to Tools->Internet Options->Security and select Custom Level. The "Initialize and script ActiveX controls not marked as safe" setting must be set to either Enable or Prompt.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!