matlab与VB混合编程的实现步骤1111.doc
上传人:qw****27 上传时间:2024-09-12 格式:DOC 页数:11 大小:97KB 金币:15 举报 版权申诉
预览加载中,请您耐心等待几秒...

matlab与VB混合编程的实现步骤1111.doc

matlab与VB混合编程的实现步骤1111.doc

预览

免费试读已结束,剩余 1 页请下载文档后查看

15 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

首先运行mbuild–setup.进行相应设置,运行结果如下:>>mbuild-setupPleasechooseyourcompilerforbuildingstandaloneMATLABapplications:Wouldyoulikembuildtolocateinstalledcompilers[y]/n?ySelectacompiler:[1]Lcc-win32C2.4.1inC:\MATLAB~1\sys\lcc[2]MicrosoftVisualC++6.0inC:\ProgramFiles\MicrosoftVisualStudio[0]NoneCompiler:2Pleaseverifyyourchoices:Compiler:MicrosoftVisualC++6.0Location:C:\ProgramFiles\MicrosoftVisualStudioArethesecorrect?([y]/n):yTryingtoupdateoptionsfile:C:\DocumentsandSettings\ck@wj\ApplicationData\MathWorks\MATLAB\R2007a\compopts.batFromtemplate:C:\MATLAB~1\bin\win32\mbuildopts\msvc60compp.batDone...-->"C:\MATLAB~1\bin\win32\mwregsvrC:\MATLAB~1\bin\win32\mwcomutil.dll"DllRegisterServerinC:\MATLAB~1\bin\win32\mwcomutil.dllsucceeded-->"C:\MATLAB~1\bin\win32\mwregsvrC:\MATLAB~1\bin\win32\mwcommgr.dll"DllRegisterServerinC:\MATLAB~1\bin\win32\mwcommgr.dllsucceeded2、打开DEPLOYTOOL工具,进行相应选择和输入>>deploytool-----creatanewdeploymentprojiect-----MATLABbuildfor.NET-----genericcomcomponent------name:shiyan.prj------location:D:\COM3、建立M文件,直接拷贝代码functiony=mymagic(x)y=magic(x);保存完毕4、addthefile5、deploymentprojectsettingMCRoption6、buildtheproject编译结果如下:Buildoutput(2008-12-2715:52:50).mcc-F'D:\COM\shiyan.prj'mcc-Wcom:shiyan,shiyanclass,1.0-dD:\COM\shiyan\src-Tlink:lib-vclass{shiyanclass:D:\COM\mymagic.m}mcc-Wcom:shiyan,shiyanclass,1.0-dD:\COM\shiyan\src-Tlink:lib-vclass{shiyanclass:D:\COM\mymagic.m}Compilerversion:4.6(R2007a)ProcessingC:\MATLABR2007a\toolbox\matlab\mcc.encProcessingC:\MATLABR2007a\toolbox\database\mcc.encProcessingincludefiles...2item(s)added.ProcessingdirectoriesinstalledwithMCR...ThefileD:\COM\shiyan\src\mccExcludedFiles.logcontainsalistoffunctionsexcludedfromtheCTFarchive.2item(s)added.GeneratingMATLABpathforthecompiledapplication...Created37pathitems.BeginvalidationofMEXfiles:SatDec2715:53:222008Validating'C:\MATLABR2007a\toolbox\compiler\deploy\deploywhich.mexw32'.NoconflictingM-filefound.Validating'