I recently got assigned a task to convert a few algorithms written in matlab to VB.NET (or C# if VB.NET isn’t efficient).
The matlab code itself consists of a lot of matrix algebra. I initially looked through here and found there was a Matlab Coder that wrapped the matlab code but when I presented that option I was told it isn’t desirable.
I am stuck in a sense that I don’t know how to approach this with the proper tools.
Is it normally acceptable to grab libraries (http://www.codeproject.com/Articles/5835/DotNetMatrix-Simple-Matrix-Library-for-NET or http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=907&lngWId=10, these are the only ones I could find) to implement these algorithms or is that generally frowned upon?
Do I need to reinvent the wheel and implement my own algorithms for the algebra (matrix multiplication, choleksy decomposition etc)?
Basically, I am not sure what the accepted way of accomplishing this task is, any input would be appreciated. I apologize if this isn’t allowed in here, this is my first time posting but I am a long time lurker.
You have several possibilities.
If your application can bear the loading time of
MCR, you can useMatlab .NET Builder. It will compile a.NETclass, which will runMCRsilently underneath. All of your clients will be forced to installMCRon their computer.If your code must be native you can either rewrite the code, or use
Matlab Coder, which will convert the code into unreadable, nativec++code.If you choose to rewrite the code, I would recommend finding an implementation of
LAPACKlinear algebra routines on.NET, as Matlab is based on them.