0

我的朋友在matlab中编写了很好的图像处理功能(使用图像处理工具箱),有一种方法可以自动将此matlab代码生成为c代码(源代码),我可以将它包装在.net可以加载的dll中???

using System;
using System.Runtime.InteropServices;
class PlatformInvokeTest
{
    [DllImport("imp.dll")]
    public static extern int puts(string c);
    [DllImport("imp2.dll")]
    internal static extern int _flushall();

    public static void Main() 
    {
        puts("Test");
        _flushall();
    }
}

谢谢

4

1 回答 1

0

MATLAB 编译器可以做到这一点。采用

mcc -X MyFunction.m

这将生成“.dll”、C 源代码、它的头文件和 C 上的 MEX 包装器。仔细阅读以了解其他选项

于 2012-04-20T06:37:59.993 回答