vs调试matlab,VS调用matlab函数

当输出以下信息时编译成功了..............................................................

Compiler version: 4.9 (R2008b) Warning: Duplicate directory name:

E:\MATLAB. mcc -W 'dotnet:eaqual,Eaqual,0.0,private' -d

'E:\MATLAB\eaqual\src' -T 'link:lib' -v 'class{Eaqual

:\Program Files\MATLAB\R2008b\toolbox\aero\aero\angle2quat.m}'

Warning: Name is nonexistent or not a directory: D:\Program

Files\MATLAB\R2008b\toolbox\compiler\patch. Warning: Name is

nonexistent or not a directory: D:\Program

Files\MATLAB\R2008b\toolbox\compiler\patch. Processing D:\Program

Files\MATLAB\R2008b\toolbox\aero\mcc.enc Processing D:\Program

Files\MATLAB\R2008b\toolbox\matlab\mcc.enc Processing include

files... 2 item(s) added. Processing directories installed with

MCR... The file E:\MATLAB\eaqual\src\mccExcludedFiles.log contains

a list of functions excluded from the CTF archive. 2 item(s) added.

Generating MATLAB path for the compiled application... Created 40

path items. Begin validation of MEX files: Sat Mar 28 15:35:11 2009

End validation of MEX files: Sat Mar 28 15:35:11 2009 Warning: Name

is nonexistent or not a directory: D:\Program

Files\MATLAB\R2008b\toolbox\compiler\patch. Deleting 0 temporary

MEX authorization files. Parsing file "D:\Program

Files\MATLAB\R2008b\toolbox\aero\aero\angle2quat.m" (Referenced

from: "Compiler Command Line"). Parsing file "D:\Program

Files\MATLAB\R2008b\toolbox\compiler\deploy\deployprint.m"

(Referenced from: "Compiler Command Line"). Parsing file

"D:\Program Files\MATLAB\R2008b\toolbox\compiler\deploy\printdlg.m"

(Referenced from: "Compiler Command Line"). Generating file

"E:\MATLAB\eaqual\src\Eaqual.cs". Generating file

"E:\MATLAB\eaqual\src\EaqualNative.cs". Generating file

"E:\MATLAB\eaqual\src\readme.txt". Generating file

"E:\MATLAB\eaqual\src\dotnet_mcc_component_data.cs". Executing

command: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe

/nologo /optimize /doc:"E:\MATLAB\eaqual\src\eaqual.xml" /t:library

/r:"D:\Program

Files\MATLAB\R2008b\toolbox\dotnetbuilder\bin\win32\v2.0\MWArray.dll"

/resource:"E:\MATLAB\eaqual\src\eaqual.ctf"

/out:"E:\MATLAB\eaqual\src\eaqual.dll"

"E:\MATLAB\eaqual\src\Eaqual.cs"

"E:\MATLAB\eaqual\src\dotnet_mcc_component_data.cs" Executing

command: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe

/nologo /optimize /doc:"E:\MATLAB\eaqual\src\eaqualNative.xml"

/t:library /r:"D:\Program

Files\MATLAB\R2008b\toolbox\dotnetbuilder\bin\win32\v2.0\MWArray.dll"

/resource:"E:\MATLAB\eaqual\src\eaqual.ctf"

/out:"E:\MATLAB\eaqual\src\eaqualNative.dll"

"E:\MATLAB\eaqual\src\EaqualNative.cs"

"E:\MATLAB\eaqual\src\dotnet_mcc_component_data.cs"

Copying: E:\MATLAB\eaqual\src\eaqual.dll ->

E:\MATLAB\eaqual\distrib

Copying: E:\MATLAB\eaqual\src\eaqualNative.dll ->

E:\MATLAB\eaqual\distrib

Copying: E:\MATLAB\eaqual\src\readme.txt ->

E:\MATLAB\eaqual\distrib

Compilation completed succesfully. The output is located in

E:\MATLAB\eaqual\distrib.

You can package the component by clicking on the "package" icon in

the Deployment Tool toolbar, or by clicking the

Tools->package menu when the Deployment Tool panel

is selected. To include additional files in the package, click

Project->Settings).

..............................................................生成的文件在工程文件夹里面我的是E:\MATLAB\eaqual\distrib\angle2quat.dll至此MATLAB的操作全部完成4、打开VISUAL Studio 2008新建C#工程,这里用的是控制台名为TestOfmatlab_consolt我的是E:\Visual

Studio

2008\Projects\TEST\TestOfmatlab_consolt添加引用E:\MATLAB\eaqual\distrib\angle2quat.dll和D:\Program

Files\MATLAB\R2008b\toolbox\dotnetbuilder\bin\win32\v2.0\MWArray.dll

(这里我没有用MATLAB画图,所以只引用MWArray.dll)加入命名空间:using MathWorks.MATLAB.NET.Arrays;将下面代码加入Main函数eaqual.Eaqual eq=new eaqual.Eaqual();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值