What to Do First

Let us assume that the user has compiled the Matlab interface, set an agent name, started a Matlab session and is now ready to use NetSolve. In this section we describe those features of the interface that allow the user to obtain information about the currently available NetSolve system.

As stated briefly in the Section called Problems that can be solved with NetSolve in Chapter 4, it is possible to obtain the list of solvable problems from Matlab, as well as from the homepage CGI scripts or the management tools. In the case of Matlab, this information is obtained by typing the following command
>> netsolve
NetSolve - List of available problems -
[ output args ] = netsolve(problem name, input args)
Information on a specific problem : netsolve(problem name)
Information on the servers : netsolve('?')
where each line contains a full problem name. If the user would like more detailed information on a specific problem, e.g., eig, he can type
>> netsolve('eig')
-- eig -- Wrapper around the LAPACK routine DGEEV --
Simplified version of DGEEV.
Computes the eigenvalues of a double precision real
matrix A. Returns two double precision real
vectors containing respectively the real parts and
the imaginary parts of the eigenvalues.

MATLAB Example : [r i ] = netsolve('eig',a)

* 1 objects in INPUT
 - input 0: Matrix Double Precision Real.
 Matrix A
* 2 objects in OUTPUT
 - output 0: Vector Double Precision Real.
 Real parts of the eigen values
 - output 1: Vector Double Precision Real.
 Imaginary parts of the eigen values
Output Objects 0 and 1 can be merged.
This output gives a short description of the problem, an example in Matlab using netsolve(), the input objects that must be supplied by the user, and the output that will be returned to the user. This particular problem requires only one double-precision matrix on input. Notice that this matrix must be square (as stated in the description of the problem). If the user tries to call NetSolve for this problem with a rectangular matrix, he will receive an error message stating that the dimensions of the input are invalid. On output, the problem eig will return two vectors, the real and imaginary parts of the eigenvalues of the input matrix, respectively.

Since Matlab provides a mechanism to manipulate complex objects, it is probable that the user would like to have eig return one single complex vector instead of two separate real vectors. Thus, in the Matlab interface it is possible to merge these two real output vectors into one complex vector. This point is further developed in the next section.

The Matlab interface has another feature that is concerned not with the actual problem solving, but with providing information about the NetSolve configuration itself. We have just seen how to get information about the problems handled by the NetSolve servers; it is also possible to obtain the physical locations of these servers. Let us assume that our NETSOLVE_AGENT environment variable is set to netsolve.cs.utk.edu (see Chapter 14). The command
>> netsolve('?')
produces the following output:
NetSolve - List of available agents -
NetSolve - List of available servers -
torc3.cs.utk.edu( (0 failures)

The same information can be obtained from the homepage CGI scripts or the management tools.