4

I have developed some matlab functions for voice authentication.

And now I want to use an application to provide input to those functions and execute those values in the matlab functions and get the results again to the application.

Is there any particular way to do this?

3 Answers 3

3

Mathworks has a product called the MATLAB Builder NE for doing just this.

It will build a DLL for either .NET or COM, wrapping the MATLAB code. You can then execute the code on any machine which has the MATLAB runtime (free) installed on it.

From what I've seen, this really just creates a DLL with the proper overloads for every function in your code, and helps you convert from .NET types into MATLAB arrays. In the end, it is still calling native MATLAB code and running it on the MATLAB runtime, so it is something that could be self-implemented as well (although it would take some probably significant effort).

Sign up to request clarification or add additional context in comments.

Comments

0

This extract is taken from my blog post which demonstrates the procedures needed to compile a .NET dll from MATLAB CODE http://scriptbucket.wordpress.com/category/matlab/ this should be of 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());
    }

}

}

1 Comment

Note that the linked website assumes the existence of the MATLAB Builder toolbox which I linked to in my answer stackoverflow.com/a/11592376/940
0

The following links can help you with your problem. The first one has used a matlab program in a c# program using COM objects and the second link has described 3 ways to communicate with matlab in a 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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.