Recently in the implementation of ASP. NET and matlab compilation, almost looked at the network all the students on the solution, in general there are two ways to achieve. One is to use Mlapp.mlappclass to execute MATLAB directly. The other is the use of MATLAB comes with the compiler MCR to compile. m files into DLL files, referenced and used in ASP.
Specific methods please refer to the MATLAB website for an example, a very detailed explanation of the second method of the correct use of the method. The specific steps are not written, only the most critical code left, for everyone to learn.
Http://cn.mathworks.com/support/2013a/dotnetbuilder/4.1.3/demos/using-builder-ne.html
1//usingRdupjr//I generated myself a DLL, which has a class named Rduclass ()2 3Rduclass obj =NULL;4Mwnumericarray input =NULL;5Mwnumericarray output =NULL;6Mwarray[] result =NULL;7 8 Try9 {Tenobj =NewRduclass (); Oneinput = -; Aresult = Obj.rdu (1, input, input); -Output = (Mwnumericarray) result[0]; - Console.WriteLine (output); the Console.read (); - - } - Catch(Exception) + { - + Throw; A}
With this method, all kinds of data transfer from MATLAB to C # can be completed. Referring to this principle, C # is not a difficult thing to pass on to Matlab.
Original address: http://www.cnblogs.com/bobyin/p/4506861.html
Asp. NET (C #) mixed with MATLAB compilation