After peeking around the internet it looks like it is possible to interop between C# and Matlab. I am wondering if anyone has had success with it and what they did to do so. If possible somehow pulling it off without the use of COM. Thanks for your time.
Yes, quite possible. Though I ended up using the C interface and calling into that using a mixed-mode DLL (and getting C# to call into that... but that was because I was also interfacing with some other C code). It's quite straightforward. On computers where you want to run your program, you'll need to install Matlab Runtime MCRInstaller.exe.
edit: removed broken link
If your willing to spend mony this may be what you need. http://www.mathworks.com/products/netbuilder/ It can generate rappers for matlab code that allow it to be called from both .net and com.
Current versions of MATLAB do not support .NET access directly. Shipping versions of MATLAB don't host a .NET runtime. It is possible to access .NET objects from MATLAB using CCW:
http://www.mathworks.com/support/solutions/data/1-5U8HND.html?solution=1-5U8HND
and the MATLAB engine from .NET:
You can also use the MATLAB Builder NE to wrap m-code into .NET assemblies.
Yes, I managed to do that and it was mostly painless.
You'd have to compile your MATLAB code for .NET (as explained in pervious answers), run MCR installer, reference MWArray.dll and the complied code dll in your .NET project and off you go.
The only annoyance was the casting (and sometimes multiple castings!) that the interface forces on you (using explicit in the cast operators)
Thank you everyone who has replied. Since I am student I did not have access to the really easy wrappers or extra matlab compilers. I have since given up and converted the code to use a solid math library instead.
There is a free and open source .NET wrapper for Matlab, and it is very simple: http://www.codeproject.com/KB/dotnet/matlabeng.aspx
I use this.