Solved

Matlab and ASP

Posted on 2007-03-30
4
880 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
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Message not shown 5 82
wordpress display sub menu only when click 12 73
Html fieldset fix its height and width 4 44
MS SQL + date 6 41
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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.

685 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