Solved

Matlab and ASP

Posted on 2007-03-30
4
884 Views
Last Modified: 2016-02-10
Hi experts
I have written a code in asp to call matlab application ,
it is as follows

<%

Dim h
Set h = CreateObject("matlab.application")
Call h.Execute ("cd C:\matlablocal\MATLAB704\work\Saniya\testing110107")
Call h.Execute ("slbuild('testing')")
response.redirect("On.asp")
%>

It is directing me to the page of On. asp without any error but not performing above mentioned matlab operation can u plz guide what is happening and what I am supposed to do.
Thanx
0
Comment
Question by:saniya_ikram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
aisp earned 250 total points
ID: 18825840
You need to know which exactly MATLAB components are available on your web server. Depending on the release you can use MATLAB Builder for .NET or MATLAB COM Automation.  Look at the following link for more details
http://www.mathworks.com/support/tech-notes/1600/1608.html#Section_5

Here is another example
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=12098&objectType=file

0
 
LVL 4

Assisted Solution

by:MacroLand
MacroLand earned 250 total points
ID: 18910280
In addition to aisp

if Matlab is not installed on the computer/server you are trying to run your code

Set h = CreateObject("matlab.application")
Call h.Execute ("cd C:\matlablocal\MATLAB704\work\Saniya\testing110107")
Call h.Execute ("slbuild('testing')")

this block  will not run cause you need to create Matlab.Application using OLE server.

However response.redirect("On.asp") is an ASP code so that it should run on an ASP supporting server. That is what should be happening in your case.

You can trace like;
On Error Goto matlab_error:
Set h = CreateObject("matlab.application")
Call h.Execute ("cd C:\matlablocal\MATLAB704\work\Saniya\testing110107")
Call h.Execute ("slbuild('testing')")

matlab_error:
 Response.Write "<P>Matlab is not installed</P>"

Regards,
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question