资源简介
C#调用matlab 实例 源代码 下载 csdn
C#过程文件和matlab 工程文件,亲测成功,好用别忘了给评价
代码片段和文件信息
/*
* MATLAB Compiler: 4.14 (R2010b)
* Date: Sun Jan 25 21:58:38 2015
* Arguments: “-B“ “macro_default“ “-W“ “dotnet:cs1Class10.0private“ “-T“ “link:lib“
* “-d“ “C:\Program Files\MATLAB\R2010b\bin\cs1\src“ “-w“ “enable:specified_file_mismatch“
* “-w“ “enable:repeated_file“ “-w“ “enable:switch_ignored“ “-w“
* “enable:missing_lib_sentinel“ “-w“ “enable:demo_license“ “-v“ “class{Class1:C:\Program
* Files\MATLAB\R2010b\bin\twice.m}“
*/
using System;
using System.Reflection;
using System.IO;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
#if SHARED
[assembly: System.Reflection.AssemblyKeyFile(@““)]
#endif
namespace cs1
{
///
/// The Class1 class provides a CLS compliant MWArray interface to the M-functions
/// contained in the files:
///
/// C:\Program Files\MATLAB\R2010b\bin\twice.m
///
/// deployprint.m
///
/// printdlg.m
///
///
/// @Version 0.0
///
public class Class1 : IDisposable
{
#region Constructors
///
/// The static constructor instantiates and initializes the MATLAB Compiler Runtime
/// instance.
///
static Class1()
{
if (MWMCR.MCRAppInitialized)
{
Assembly assembly= Assembly.GetExecutingAssembly();
string ctfFilePath= assembly.Location;
int lastDelimiter= ctfFilePath.LastIndexOf(@“\“);
ctfFilePath= ctfFilePath.Remove(lastDelimiter (ctfFilePath.Length - lastDelimiter));
string ctfFileName = “cs1.ctf“;
Stream embeddedCtfStream = null;
String[] resourceStrings = assembly.GetManifestResourceNames();
foreach (String name in resourceStrings)
{
if (name.Contains(ctfFileName))
{
embeddedCtfStream = assembly.GetManifestResourceStream(name);
break;
}
}
mcr= new MWMCR(““
ctfFilePath embeddedCtfStream true);
}
else
{
throw new ApplicationException(“MWArray assembly could not be initialized“);
}
}
///
/// Constructs a new instance of the Class1 class.
///
public Class1()
{
}
#endregion Constructors
#region Finalize
///
/// Class destructor called by the CLR garbage collector.
///
~Class1()
{
Dispose(false);
}
///
/// Frees the native resources associated with this object
///
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
///
/// Internal dispose function
///
protected virtual void Dispose(bool disposing)
{
if (!disposed)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 90624 2015-01-25 21:58 matlab C#\cs1\distrib\cs1.dll
文件 90624 2015-01-25 21:58 matlab C#\cs1\distrib\cs1Native.dll
文件 30456 2015-01-25 21:58 matlab C#\cs1\distrib\cs1_overview.html
文件 4540 2015-01-25 21:58 matlab C#\cs1\distrib\readme.txt
文件 6604 2015-01-25 21:58 matlab C#\cs1\src\Class1.cs
文件 5863 2015-01-25 21:58 matlab C#\cs1\src\Class1Native.cs
文件 90624 2015-01-25 21:58 matlab C#\cs1\src\cs1.dll
文件 4927 2015-01-25 21:58 matlab C#\cs1\src\cs1.xm
文件 90624 2015-01-25 21:58 matlab C#\cs1\src\cs1Native.dll
文件 4171 2015-01-25 21:58 matlab C#\cs1\src\cs1Native.xm
文件 30456 2015-01-25 21:58 matlab C#\cs1\src\cs1_overview.html
文件 710837 2015-01-25 21:58 matlab C#\cs1\src\mccExcludedFiles.log
文件 4540 2015-01-25 21:58 matlab C#\cs1\src\readme.txt
文件 410624 2015-01-25 22:38 matlab C#\visual studio 2012 C#调用Matlab2012.doc
文件 187 2015-01-25 22:01 matlab C#\WpfApplication7\WpfApplication7\App.config
文件 326 2015-01-25 22:01 matlab C#\WpfApplication7\WpfApplication7\App.xaml
文件 342 2015-01-25 22:01 matlab C#\WpfApplication7\WpfApplication7\App.xaml.cs
文件 90624 2015-01-25 21:58 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\cs1.dll
文件 90624 2015-01-25 21:58 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\cs1Native.dll
文件 102400 2010-08-03 20:22 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\MWArray.dll
文件 247115 2010-08-03 20:22 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\MWArray.xm
文件 9216 2015-01-25 22:37 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\WpfApplication7.exe
文件 187 2015-01-25 22:01 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\WpfApplication7.exe.config
文件 30208 2015-01-25 22:37 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\WpfApplication7.pdb
文件 22984 2015-01-25 22:38 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\WpfApplication7.vshost.exe
文件 187 2015-01-25 22:01 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\WpfApplication7.vshost.exe.config
文件 490 2010-03-17 22:39 matlab C#\WpfApplication7\WpfApplication7\bin\Debug\WpfApplication7.vshost.exe.manifest
文件 288 2015-01-25 22:01 matlab C#\WpfApplication7\WpfApplication7\MainWindow.xaml
文件 1607 2015-01-25 22:36 matlab C#\WpfApplication7\WpfApplication7\MainWindow.xaml.cs
文件 2325 2015-01-25 22:24 matlab C#\WpfApplication7\WpfApplication7\obj\Debug\App.g.cs
............此处省略39个文件信息
- 上一篇:C#WPF 右键菜单 显示 事件触发 测试通过
- 下一篇:KNN算法C#例程
相关资源
- KNN算法C#例程
- C#WPF 右键菜单 显示 事件触发 测试
- SevenZipSharp.dll和7z.dll
- C# Json转换DataTable源文件
- C# 动态链接机制 插件平台AppDomain对
- 利用C#打开EXCEL并将数据更新保
- C# 异步Socket 多人聊天室完整源码
- C#中读取Excel表格数据
- Winform 画多边形
- 中兴华为C#编码规范
- C# winform Socket 即时通讯
- C#textbox下拉提示 textbox智能提示 te
- C#连接oracle数据库增删改查
- 基于GPRS的远程通讯C#程序SOCKET部分带
- C# winform 单击与双击事件同时存在
- c#+vs2005的局域网抢答器
- 留言板C# 窗口版和网页版
- C#:ARGB与16进制颜色显示与转换
- c#调用winapi实现WinForm中嵌入EXE程序
- otsu阈值分割c#语言
- C#和PLC利用modbus通信
- 百度翻译API,C#接口。
- 我写的TreeGrid源代码 TreeGrid 网格树录
- C#软键盘支持中英文输入
- BarScan条形码扫描源码c#
- 使用C#.NET实现FTP文件
- C# winform 朗读输入文本
- 电子邮件email收取客户端程序,C#源代
- HIKVISION工业相机通过Halcon二次开发的
- 用C#编程调用Visio的COM接口,获取Vis
评论
共有 条评论