The easiet way to perform a numerical computation in NetSolve is to call the function netsolve(). With this function, the user sends a blocking request to NetSolve. By blocking we mean that after typing the command in the Octave session, the user resumes control only when the computation has been successfully completed on a server. The other way to perform computation is to send a nonblocking request as described in later sections.
Let us continue with the eig example we started to develop in the preceding section. The user now knows that he has to provide a double-precision square matrix to NetSolve, and he knows that he is going to get two real vectors back (or one single complex vector). He first creates a 300 X 300 matrix for instance;
octave>> a = rand(300);
>> [x y] = netsolve('eig',a)
All the calls to netsolve() will look the same, following a similar convention as those in the Matlab section. The left-hand side must contain the arguments, in the same order as listed in the output description. The first argument to netsolve() is always the name of the problem. After this first argument the input arguments are listed, in the same order as they are listed in the input description. This function does not have a fixed calling sequence, since the number of inputs and outputs depends on the problem that needs to be solved. Let us see what happens when we type:
octave>> [x y] = netsolve('eig',a) x = y = 10.1204 0 -0.9801 0.8991 -0.9801 -0.8991 -1.0195 0 -0.6416 0.6511 ... ... ... ...
As mentioned earlier, the user can decide to regroup x and y into one single complex vector. Let us make it clear again that this possibility is a specificity of eig and is not available in general for all problems. To merge x and y, the user has to type:
octave>> [x] = netsolve('eig',a) x = 10.1204 -0.9801 + 0.8991 -0.9801 - 0.8991 -1.0195 -0.6416 + 0.6511 ...... ......