Interfacing Matlab functions with the web

10 views (last 30 days)
Mahesh
Mahesh on 11 Dec 2011
I am trying to interface one of my Matlab functions with the web. There is a GUI for my matlab function that I would like to make available on the internet or a local server. I would also like to be able to pass values to my function from a client end that is connected to the same server. Is this possible? If so what is the best way to do it?

Answers (1)

Walter Roberson
Walter Roberson on 11 Dec 2011
When you say "the web", I am going to interpret that as meaning using an HTTP or HTTPS server, with the user accessing through a common web browser. (If you had said "the internet" then additional possibilities would have been available.)
If you are using a web server and if the GUI is not pure text, then you will have some challenge getting the graphics to the user.
One possibility is to rewrite your GUI as HTML, possibly driven by a scripting language such as php or perl or Visual Basic. When the GUI had gathered input and error-checked it, it would invoke your code, passing in the control information in a structured form, and returning any text or image files to the user.
If you proceed this way, you can use the standard MATLAB executable to provide the service, but you might be required to obtain a NETWORK license on the server system, at additional expense, and you might be required to limit access to specifically-registered users (registered by you: you might not be allowed to make it publicly accessible, only to users and organization you individually authorize.) See the MATLAB license Terms & Conditions for more information.
Another possibility is that you can use the MATLAB JA Builder to create an encrypted executable with a Java wrapper, that you could control from a Java program; most modern browsers support Java. You are able to display figures and controls using this method. This MathWorks product requires the MATLAB Compiler. The resulting Java code may be served by any of the OS's that are supported for MATLAB (e.g., Windows 32, Windows 64, Linux, Mac OS X). Note: the MATLAB Compiler product that is needed to use this Builder product, is not available for the MATLAB Student Version.
You can alternately use the MATLAB Builder NE to create an encrypted executable with a .NET wrapper, that you could control from a .NET web application. You are able to display figures and controls using this method. This MathWorks product requires the MATLAB Compiler. The resulting .NET code may be served only by Windows 32 or Windows 64. Note: the MATLAB Compiler product that is needed to use this Builder product, is not available for the MATLAB Student Version.
There are, in short, ways that you can use to make your MATLAB available (in limited some respect) to other people, but you will have to pay well to do it.

Categories

Find more on Get Started with MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!