Matlab 调用 C# dll
2015-10-28 09:21
211 查看
1.VS 建立一个类库工程
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Matleb1
{
public class Class1
{
public static int method1()
{
return 15;
}
}
}
shift+F6编译
2.打开matlab R2014 输入以下两行
>> NET.addAssembly('d:\vsProject\Matleb1\Matleb1\bin\Debug\Matleb1.dll')
>> Matleb1.Class1.method1()
结果:
ans =
15
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Matleb1
{
public class Class1
{
public static int method1()
{
return 15;
}
}
}
shift+F6编译
2.打开matlab R2014 输入以下两行
>> NET.addAssembly('d:\vsProject\Matleb1\Matleb1\bin\Debug\Matleb1.dll')
>> Matleb1.Class1.method1()
结果:
ans =
15
相关文章推荐
- C#.NET获取拨号连接的宽带连接方法
- C#.Net ArrayList的使用方法
- PowerShell中使用.NET将程序集加入全局程序集缓存
- .net(c#)中的new关键字详细介绍
- 由vbs sort引发.NET Framework之间的关系说明
- C#难点逐个击破(6):C#数据类型与.net framework数据类型
- .NET中的async和await关键字使用及Task异步调用实例
- .Net中的json操作类用法分析
- .net实现序列化与反序列化实例解析
- .NET中的Timer类型用法详解
- 关于.net(C#)中的跨进程访问的问题
- .NET实现父窗体关闭而不影响子窗体的方法
- 基于.Net中的数字与日期格式化规则助记词的使用详解
- 解析在main函数之前调用函数以及对设计的作用详解
- .NET微信公众号开发之公众号消息处理
- .Net下的签名与混淆图文分析
- .NET 扩展实现代码
- .NET实现定时发送邮件代码(两种方式)
- .net实现文件读写的几种常用方法
- .net文件上传时实现通过文件头确认文件类型的方法