【发布时间】:2013-09-26 12:30:19
【问题描述】:
使用 MATLAB Compiler Runtime (mcr) 我创建了 entropy.m 的 dll,选择 FrameWork 版本 4.0。我已将此 dll 添加到 c# 引用中。我还必须添加 MWArray.dll 来为方法创建所需的参数。
> public class Entropy : IDisposable
> {
> //Constructors,Finalize,Methods,Class Members are located here.
> }
> using com.Entropy;
> using MathWorks.MATLAB.NET.Arrays;
> using MathWorks.MATLAB.NET.Utility;
这是我的问题。我正在尝试获取 Entropy 类的实例,例如
Entropy ep = new Entroyp();
但是它会抛出一个异常:
> The type initializer for 'com.Enthropy.Enthropy threw an exception.
此外,当我尝试创建 MWNumericArray 时,它会引发相同的异常。我试图将我的项目的框架版本更改为 4.0,但它不起作用。这个错误的原因是什么?
此外,我还查看了下面的链接。
【问题讨论】:
标签: c# .net matlab matlab-compiler