Matlab是一个强大的数学计算/仿真工 具,其内置了很多实用的现成的函数,而且我们经常也自己定义很多m函数。但在很多情况下,我们不得不使用VC编程。那么,如何在VC中利用matlab的 资源呢? 在这里我简要的以一个简单的例子来说明一下如果在VC中调用matlab中定义的.m文件。繁多的理论就不说了,简明扼要的说一个实例。相信大家看过之后 都会马上学会的
其中灰色底显示的部分是需要我们手工输入的部分。
 
步骤如下:

㈠当然是先建立matlab的m文件。

这里为了简单起见,我在matlab中定义了一个函数, 其m文件如下:
function y = add_zh(a,b)     
y=a+b
保存为myfunct.m
 

㈡下面来对matlab编译环境进行设置。

打开matlab,在命令行状态下键入:mex-setup

然后出现如下提示:
--------------------------------------------------------------------------------------
Select a compiler:
[1] Borland C++Builder version 5.0 in C:\Program Files\Borland
[2] Lcc C version 2.4 in F:\SOFT\SHARE\MATLAB65\sys\lcc
[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
 
Compiler:
--------------------------------------------------------------------------------------
这里我们选择’3’。(如果使用其他的编译器比如BCB,那么就可以相应的选择’1’)
然后,继续在命令行状态下输入:
mbuild –setup
--------------------------------------------------------------------------------------
Please choose your compiler for building standalone MATLAB applications: 
Would you like mbuild to locate installed compilers [y]/n? y
Select a compiler:
[1] Borland C++Builder version 5.0 in C:\Program Files\Borland
[2] Lcc C version 2.4 in F:\SOFT\SHARE\MATLAB65\sys\lcc
[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
 
Compiler:
--------------------------------------------------------------------------------------
这里需要几步确认。大家按情况操作即可。
 

㈢对VC的编译器环境进行设置。

在Tools-options-directory里面设置include和lib的路径,分别添加一项,指向matlab安装目录中的\extern\include和 \extern\lib
 
 

㈣将.m文件编译为动态链接库

这一步比较关键。在这一步中,将matlab中的.m文件转换为dll。
在matlab命令行中输入:
mcc -t -h -L C -W lib:ppp -T link:lib
myfunct.m

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAk8AAAERC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nmi9z9H2248Hn/rpdvfeun2y3f/gv75iRq1CxehxKpDbTTPo+abIFMrK6VqtSy/ZherGV3vUpVm9JR0qB3IBNkekCe3yO1H3mJblUZrMUVdd6lWYZNHrJIbBrgm6apjyhRsVFM9GaBf5xoOeOpYp/h1ZbWjZ+nqDxe7RH+C/HoUzSoVuhiFLiudflfOH7pbI0aZHFiNf3Sbn8Yakyez1x/0+kPd39TeLgegsNi4Y5ba4wXA1NCq3cZ3X/7a9p99bXuf/v3h9/8s+oPaAZASiB0AM0Mb3+7ovQ9t/vJsKwAAAHAxEM0VAABA8YHaAQAAKD5QOwAAAMUHagcAAKD4QO0AAAAUH6gdAACA4gO1AwAAUHygdgAAAIoP1A4AAEDxgdoBAAAoPlA7AAAAxQdqBwAAoPhA7QAAABQfqB0AAIDiA7UDAABQfP4/r543yV75CwcAAAAASUVORK5CYII=" alt="" />
 
 
至此,可以发现在myfunct.m所在的目录中产生了一大堆文件。我们只用其中3个:
ppp.h   
ppp.lib    
ppp.dll
 
 

㈤ 测试与调用

1. 新建一个VC工程。这里取名为mat。为了简单,我们在这里建立一个对话框来进行演示。如下:

然后,将上面这3个文件拷贝到VC工程所在的目录中,以便VC调用之。

 
2. 进行VC编程。
首先,在cpp文件中加入: #include
“ppp.h”;
然后,设置VC的链接库。在project-settings-link下的object/library
modules中加入:
ppp.lib;libmx.lib;libmatlb.lib;libmmfile.lib;
    至此,VC的编译环境设置完毕。下面就是编程部分了。
 
3. 编程部分的关键:接口和数据类型的转换
先给出VC实现的源代码:
void CMatDlg::OnButton1()
{ //在matlab中定义的m文件:myfunct,其功能是完成两个数的相加操作。
CString str;
UpdateData(true);
pppInitialize();
//为了调用matlab中的函数,必须使用数组数据类型,并其后调用matlab函数将其转化为矩阵格式(matlab的基本数据类型是矩阵)
static double x1[1]={1.0};
static double x2[1]={2.5};
double result;
//调用matlab创建3个矩阵
mxArray *A=mclGetUninitializedArray();
mxArray *B=mclGetUninitializedArray();
mxArray *C=mclGetUninitializedArray();
//将C语言中的变量值赋给matlab中的矩阵
mlfAssign(&A,mlfDoubleMatrix(1,1,x1,NULL));
mlfAssign(&B,mlfDoubleMatrix(1,1,x2,NULL));
mlfAssign(&C,mlfMyfunct(A,B));
//将matlab中的矩阵的指针传递给C语言中的指向double的指针
double * md=mxGetPr(C);
result=md[0];
//释放这些矩阵
mxDestroyArray(A);
mxDestroyArray(B);
mxDestroyArray(C);
str.Format ("It is : %f",result);
::AfxMessageBox(str);
}
相信看到里面的注释,我们就明白的差不多了。
VC编程以实现对matlab函数的调用,例如VC中我们实现两个double型的相加,则需要做上述的编程:首先定义两个数组并存入我们要进行函数操作的数据(也就是所谓的实参);然后将这两个数组转换为matlab可以识别的矩阵;然后调用m文件中自定义的函数,对矩阵进行操作;最后将结果再转回VC支持的数据格式:
            double * md=mxGetPr(C);
            result=md[0];     
至此,经matlab函数处理过的数据已经存入了VC中的result变量。        
            mlfAssign(&C,mlfMyfunct(A,B));
大家可以看出来,在进行调用的时候,我们使用的是m文件的文件名myfunct,而不是m文件中定义的add_zh(a,b)
程序中,我们要实现1.0和2.5的相加运算,结果如下:
。。。
 
运行报错:e:\program files\matlab\r2009a\extern\include\mclmcr.h(1764) :
error C2065: 'REFCLSID' : undeclared identifier
e:\program files\matlab\r2009a\extern\include\mclmcr.h(1764) :
error C2146: syntax error : missing ')' before identifier
'clsid'
e:\program files\matlab\r2009a\extern\include\mclmcr.h(1764) :
error C2182: 'mclCLSIDtochar_proxy' : illegal use of type
'void'
e:\program files\matlab\r2009a\extern\include\mclmcr.h(1764) :
error C2059: syntax error : ')'
e:\program files\matlab\r2009a\extern\include\mclmcr.h(1768) :
error C2065: 'REFGUID' : undeclared identifier
e:\program files\matlab\r2009a\extern\include\mclmcr.h(1768) :
error C2146: syntax error : missing ')' before identifier
'guid'
未解决

【转】C++调用Matlab的.m文件的更多相关文章

  1. java调用matlab生成exe文件

    一.Matlab生成Java Package 1.在MATLAB的Command Window输入deploytool命令,选择Library Compiler. 2.在弹出的窗口选择Java Pac ...

  2. Atitit java c# php c++ js跨语言调用matlab实现边缘检测等功能attilax总结

    Atitit java c# php c++ js跨语言调用matlab实现边缘检测等功能attilax总结 1.1. 边缘检测的基本方法Canny最常用了1 1.2. 编写matlab边缘检测代码, ...

  3. c++与matlab联合编程,调用Deploytool 生成exe文件和dll文件(转)

    转自:http://www.cnblogs.com/xlw1219/archive/2012/12/25/2832222.html 首先必须知道联合编程需要知道的一些命令解释: mcc 的作用是将 . ...

  4. WPF调用Matlab函数方法

    有的时候用C#写图像处理方法,比较费事,不如Matlab简单,但是Matlab又做不出WPF那样的好看界面,怎么办呢. 今天正好我要实现这个功能,就顺便写个小例子,给需要的人做个借鉴. 想要用WPF调 ...

  5. MyEclipse调用Matlab打包函数

    本文部分内容参考了http://www.360doc.com/content/15/1103/16/1180274_510463048.shtml 一.检查Java环境 对于已经装上JAVA环境的计算 ...

  6. 【原创】Matlab.NET混合编程技巧之直接调用Matlab内置函数

                  本博客所有文章分类的总目录:[总目录]本博客博文总目录-实时更新    Matlab和C#混合编程文章目录 :[目录]Matlab和C#混合编程文章目录 在我的上一篇文章[ ...

  7. VS2008 C++ 调用MATLAB 2009b 生成的DLL .

    转载: 刚开始学习用VC++调用matlab生成的DLL,找了网上一些资料,难以找到vs2008与MATLAB2009b版本的,按照以往版本做的总是有很多错误.经过两天努力,终于调试成功,这里将经验总 ...

  8. asp.net下调用Matlab生成动态链接库

    对于这次论文项目,最后在写一篇关于工程的博客,那就是在asp.net下调用matlab生成的dll动态链接库.至今关于matlab,c/c++(opencv),c#(asp.net)我总共写了4篇配置 ...

  9. matlab 中txt文件(含字符及数值)处理

    matlab 中txt文件(含字符及数值)处理 (2008-08-02 09:45:12) 转载▼ 标签: 杂谈 分类: matlab及C学习 Matlab文件操作及读txt文件ZZ 2008-07- ...

随机推荐

  1. 架构师入门ing

    算法竞赛水平一般,算法工程师估计遥遥无期,准备开始架构方面的学习. 单纯依靠垂直提升硬件性能来提高系统性能的时代已结束,分布式开发的时代实际上早已悄悄地成为了时代的主流. 在一个团队里,架构师充当了技 ...

  2. hadoop-hdfs(三)

    HDFS概念 1 数据块* HDFS的一个数据块默认是64M,与元数据分开管理. 优点: 数据块的大小设计的较大,所以寻址占传输的时间比例较小,只需要计算传输速度即可. 便于简化管理,利于计算剩余空间 ...

  3. Comparable和Comparator的学习笔记

    目录 Comparable和Comparator的实现 Comparable接口 Comparator接口 总结 参考自 今天在项目开发中,遇到要对List中的对象按照对象某一属性进行排序的问题,我发 ...

  4. DataBase -- Note I

    SQL对大小写不敏感! SQL DML和DDL:可以把SQL分为两个部分:数据操作语言(DML)和数据定义语言(DDL) SQL(结构化查询语言)是用于执行查询的语法.但是SQL语言也包含用于更新.插 ...

  5. [洛谷P4656][CEOI2017]Palindromic Partitions

    题目大意:一个长度为$n$的字符串,要求把它分成尽可能多的小块,使得这些块构成回文串 题解:贪心,从两边从找尽可能小的块使得左右的块相等,判断相等可以用$hash$ 卡点:无 C++ Code: #i ...

  6. BZOJ2879 [Noi2012]美食节 【费用流】

    题目 CZ市为了欢迎全国各地的同学,特地举办了一场盛大的美食节.作为一个喜欢尝鲜的美食客,小M自然不愿意错过这场盛宴.他很快就尝遍了美食节所有的美食.然而,尝鲜的欲望是难以满足的.尽管所有的菜品都很可 ...

  7. 《c程序设计语言》读书笔记-5.3-指针实现strcat

    #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> ...

  8. webpack最佳入门实践系列(3)

    6.使用图片 6.1.尝试在css中引入图片 在src目录下新建css文件夹,并且在css文件夹下创建app.css文件,在src目录下新建images文件夹,放入一张图片,在app.css中引入这张 ...

  9. jquery,zepto插件编写相关

    1. $.fn.pluginName = function(opt){}就是为jquery的prototype定义了函数, 这样, 任何一个jquery对象都可以使用这个成员函数, 这种写法直观明了, ...

  10. openGL初学函数解释汇总

    openGL初学函数解释汇总 1.GLUT工具包提供的函数 //GLUT工具包所提供的函数 glutInit(&argc, argv);//对GLUT进行初始化,这个函数必须在其它的GLUT使 ...