Matlab Code Integration in C # Application

I developed some matlab functions for voice authentication.

And now I want to use the application to input these functions and execute these values ​​in matlab functions and get the results in the application again.

Is there any specific way to do this?

+4
source share
3 answers

Mathworks has a product called MATLAB Builder NE to do just that.

It will build a DLL for .NET or COM by wrapping MATLAB code. Then you can execute the code on any computer on which MATLAB runtime is installed ( free ).

From what I saw, it really creates a DLL with corresponding overloads for each function of your code and helps you convert from .NET types to MATLAB arrays. In the end, it still calls its own MATLAB code and runs it at runtime MATLAB, so it can be self-executing (although it will take some, probably considerable effort).

+3
source

This excerpt is taken from my blog post demonstrating the procedures required to compile a .NET dll from MATLAB CODE http://scriptbucket.wordpress.com/category/matlab/ . It should be some help to you.

using System; using System.Windows.Forms; using MathWorks.MATLAB.NET.Arrays; using calculator; namespace DemoCalculator { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { var calc= new demo(); MessageBox.Show(calc.calculator((MWCharArray)textBox1.Text)[1].ToString()); } } 

}

0
source

The following links may help you solve your problem. The first used the matlab program in the C # program using COM objects, and the second link described 3 ways to communicate with Matlab in the program.

http://www.codeproject.com/Articles/594636/Using-Matlab-from-a-Csharp-application

http://www.codeproject.com/Articles/5468/1-2-3-ways-of-integrating-MATLAB-with-the-NET

0
source

All Articles