Hi,
I tried to find more info about how Ansys could link to a math program, but there is very little about it in the Help.
As Stringmaker said, the way you can call the math kernel is /SYS or /SYP depending on the need to pass arguments or not. As I understand it, these arguments could be the parameters for your equation, depending on how the math-kernel link works; comand-line "options" like those which begin with a "-", for example "pkzip -a -d", should be included in the "string" part of the /SYP command. I have serious doubts about if the arguments would be re-read back in Ansys after the /SYP command execution or not: I strongly don't think so... Another doubt is if Ansys will wait for the end of the sub-session execution or not (i.e. if the /SYP call is synchronous or not), before continueing the macro execution. If the sub-session is asynchronous, you have no chance to accomplish what you need (well, there would be the trick to insert a "pause" with the /WAIT command, once you know approximately the time needed by Matlab to open, process and close). If instead it is synchronous, then you could try to have Matlab read the params from file (written by Ansys' APDL just prior to issue the /SYS or /SYP command) and write the results to another file (which would be read by Ansys' APDL right after the sub-session execution, thus controlling the attribution of the values to the correct parameters). For example, with Mathematica (Mathlink), you write an "executable macro" similar to an Ansys command file, which includes all the Mathlink commands needed for your specific task: in this example, the /SYP command would call this macro, which in its turn would perform some Mathlink-compatible operations (open a file, read data, format data, process data, write output to file). Probably something similar is possible with Matlab. I fear this will be more difficult than writing the Newton-Raphson solver...
Regards