电脑配置:

操作系统:window 8.1

Matlab 2012a安装路径:D:\Program Files\MATLAB\R2012a

VS2010 :

OpenCV 2.4.3:D:\Program Files\opencv

补充说明:

在配置前,先检查一下系统变量

1.若缺少系统变量(该路径必须添加!!!)

D:\Program Files\MATLAB\R2012a\runtime\win64

导致结果:程序无法正常启动0x000007b。请单击“确定”关闭应用程序

注意变量配置后记得重启才会生效,而且添加路径要在英文符号下加入” ; ”,末尾不需要加分号!!!!

2.其他变量:可加可不加,经验证不会影响结果!!!

(1)用户变量:

D:\Program Files\MATLAB\R2012a\bin\win64

D:\Program Files\MATLAB\R2012a\runtime\win64

(2)系统变量:

D:\Program Files\MATLAB\R2012a\bin\win64

本文转自博客:http://www.cnblogs.com/newpanderking/articles/4057977.html

1、背景

众所周知,matlab在处理矩阵、数学计算、计算机仿真、图像处理等方面有着 c c++无可比拟的优势,但是做成系统供使用时,又显得过于粗糙,为了使用起来高大上,计算起来有简单,方便。无疑,c++ 与matlab混合编程将会使非常靠谱的选择。

这里暂且不论所谓的matlab效率低,c/c++效率高的问题,自我感觉,以我目前编码的功底,所编写的代码的效率远远不及matlab提供的代码的效率。除非你是大牛,或者你是人云亦云,所以能用matlab混合c++编码还是很不错的选择,话不多说,我们开始讨论正题。

2、我使用的版本是matlab2012与vs2010混合编程的。

软件的下载这里就不多说了,我相信看这篇教程的你,这两个软件已经安装的妥妥当当的了。

这里我选用网上常用来做例子的matlab代码做测试,spline.m,该文件位于

  1. D:\Program Files\MATLAB\R2012a\toolbox\matlab\polyfun

当然该文件中依赖调用另一个文件chckxy.m,该文件也在这条路径下。找到后复制到matlab的工作目录下。

这里为了方便提供两个文件的代码:

spline.m

  1. function output = spline(x,y,xx)
  2. %SPLINE Cubic spline data interpolation.
  3. % PP = SPLINE(X,Y) provides the piecewise polynomial form of the
  4. % cubic spline interpolant to the data values Y at the data sites X,
  5. % for use with the evaluator PPVAL and the spline utility UNMKPP.
  6. % X must be a vector.
  7. % If Y is a vector, then Y(j) is taken as the value to be matched at X(j),
  8. % hence Y must be of the same length as X -- see below for an exception
  9. % to this.
  10. % If Y is a matrix or ND array, then Y(:,...,:,j) is taken as the value to
  11. % be matched at X(j), hence the last dimension of Y must equal length(X) --
  12. % see below for an exception to this.
  13. %
  14. % YY = SPLINE(X,Y,XX) is the same as YY = PPVAL(SPLINE(X,Y),XX), thus
  15. % providing, in YY, the values of the interpolant at XX. For information
  16. % regarding the size of YY see PPVAL.
  17. %
  18. % Ordinarily, the not-a-knot end conditions are used. However, if Y contains
  19. % two more values than X has entries, then the first and last value in Y are
  20. % used as the endslopes for the cubic spline. If Y is a vector, this
  21. % means:
  22. % f(X) = Y(:end-), Df(min(X))=Y(), Df(max(X))=Y(end).
  23. % If Y is a matrix or N-D array with SIZE(Y,N) equal to LENGTH(X)+, then
  24. % f(X(j)) matches the value Y(:,...,:,j+) for j=:LENGTH(X), then
  25. % Df(min(X)) matches Y(:,:,...:,) and Df(max(X)) matches Y(:,:,...:,end).
  26. %
  27. % Example:
  28. % This generates a sine-like spline curve and samples it over a finer mesh:
  29. % x = :; y = sin(x);
  30. % xx = :.:;
  31. % yy = spline(x,y,xx);
  32. % plot(x,y,'o',xx,yy)
  33. %
  34. % Example:
  35. % This illustrates the use of clamped or complete spline interpolation where
  36. % end slopes are prescribed. In this example, zero slopes at the ends of an
  37. % interpolant to the values of a certain distribution are enforced:
  38. % x = -:; y = [ . 1.12 2.36 2.36 1.46 . . ];
  39. % cs = spline(x,[ y ]);
  40. % xx = linspace(-,,);
  41. % plot(x,y,'o',xx,ppval(cs,xx),'-');
  42. %
  43. % Class support for inputs x, y, xx:
  44. % float: double, single
  45. %
  46. % See also INTERP1, PCHIP, PPVAL, MKPP, UNMKPP.
  47.  
  48. % Carl de Boor --
  49. % Copyright - The MathWorks, Inc.
  50. % $Revision: 5.18.4.6 $ $Date: // :: $
  51.  
  52. % Check that data are acceptable and, if not, try to adjust them appropriately
  53. [x,y,sizey,endslopes] = mychckxy(x,y);
  54. n = length(x); yd = prod(sizey);
  55.  
  56. % Generate the cubic spline interpolant in ppform
  57.  
  58. dd = ones(yd,); dx = diff(x); divdif = diff(y,[],)./dx(dd,:);
  59. if n==
  60. if isempty(endslopes) % the interpolant is a straight line
  61. pp=mkpp(x,[divdif y(:,)],sizey);
  62. else % the interpolant is the cubic Hermite polynomial
  63. pp = pwch(x,y,endslopes,dx,divdif); pp.dim = sizey;
  64. end
  65. elseif n==&&isempty(endslopes) % the interpolant is a parabola
  66. y(:,:)=divdif;
  67. y(:,)=diff(divdif')'/(x()-x());
  68. y(:,)=y(:,)-y(:,)*dx();
  69. pp = mkpp(x([,]),y(:,[ ]),sizey);
  70. else % set up the sparse, tridiagonal, linear system b = ?*c for the slopes
  71. b=zeros(yd,n);
  72. b(:,:n-)=*(dx(dd,:n-).*divdif(:,:n-)+dx(dd,:n-).*divdif(:,:n-));
  73. if isempty(endslopes)
  74. x31=x()-x();xn=x(n)-x(n-);
  75. b(:,)=((dx()+*x31)*dx()*divdif(:,)+dx()^*divdif(:,))/x31;
  76. b(:,n)=...
  77. (dx(n-)^*divdif(:,n-)+(*xn+dx(n-))*dx(n-)*divdif(:,n-))/xn;
  78. else
  79. x31 = ; xn = ; b(:,[ n]) = dx(dd,[ n-]).*endslopes;
  80. end
  81. dxt = dx(:);
  82. c = spdiags([ [x31;dxt(:n-);] ...
  83. [dxt();*(dxt(:n-)+dxt(:n-));dxt(n-)] ...
  84. [;dxt(:n-);xn] ],[- ],n,n);
  85.  
  86. % sparse linear equation solution for the slopes
  87. mmdflag = spparms('autommd');
  88. spparms('autommd',);
  89. s=b/c;
  90. spparms('autommd',mmdflag);
  91.  
  92. % construct piecewise cubic Hermite interpolant
  93. % to values and computed slopes
  94. pp = pwch(x,y,s,dx,divdif); pp.dim = sizey;
  95.  
  96. end
  97.  
  98. if nargin==, output = pp; else output = ppval(pp,xx); end

chckxy.m

  1. function [x,y,sizey,endslopes] = mychckxy(x,y)
  2. %CHCKXY check and adjust input for SPLINE and PCHIP
  3. % [X,Y,SIZEY] = CHCKXY(X,Y) checks the data sites X and corresponding data
  4. % values Y, making certain that there are exactly as many sites as values,
  5. % that no two data sites are the same, removing any data points that involve
  6. % NaNs, reordering the sites if necessary to ensure that X is a strictly
  7. % increasing row vector and reordering the data values correspondingly,
  8. % and reshaping Y if necessary to make sure that it is a matrix, with Y(:,j)
  9. % the data value corresponding to the data site X(j), and with SIZEY the
  10. % actual dimensions of the given values.
  11. % This call to CHCKXY is suitable for PCHIP.
  12. %
  13. % [X,Y,SIZEY,ENDSLOPES] = CHCKXY(X,Y) also considers the possibility that
  14. % there are two more data values than there are data sites.
  15. % If there are, then the first and the last data value are removed from Y
  16. % and returned separately as ENDSLOPES. Otherwise, an empty ENDSLOPES is
  17. % returned. This call to CHCKXY is suitable for SPLINE.
  18. %
  19. % See also PCHIP, SPLINE.
  20.  
  21. % Copyright - The MathWorks, Inc.
  22.  
  23. % make sure X is a vector:
  24. if length(find(size(x)>))>
  25. error(message('MATLAB:chckxy:XNotVector'))
  26. end
  27.  
  28. % ensure X is real
  29. if any(~isreal(x))
  30. error(message('MATLAB:chckxy:XComplex'))
  31. end
  32.  
  33. % deal with NaN's among the sites:
  34. nanx = find(isnan(x));
  35. if ~isempty(nanx)
  36. x(nanx) = [];
  37. warning(message('MATLAB:chckxy:nan'))
  38. end
  39.  
  40. n=length(x);
  41. if n<
  42. error(message('MATLAB:chckxy:NotEnoughPts'))
  43. end
  44.  
  45. % re-sort, if needed, to ensure strictly increasing site sequence:
  46. x=x(:).';
  47. dx = diff(x);
  48.  
  49. if any(dx<), [x,ind] = sort(x); dx = diff(x); else ind=:n; end
  50.  
  51. if ~all(dx), error(message('MATLAB:chckxy:RepeatedSites')), end
  52.  
  53. % if Y is ND, reshape it to a matrix by combining all dimensions but the last:
  54. sizey = size(y);
  55.  
  56. while length(sizey)>&&sizey(end)==, sizey(end) = []; end
  57.  
  58. yn = sizey(end);
  59. sizey(end)=[];
  60. yd = prod(sizey);
  61.  
  62. if length(sizey)>
  63. y = reshape(y,yd,yn);
  64. else
  65. % if Y happens to be a column matrix, change it to the expected row matrix.
  66. if yn==
  67. yn = yd;
  68. y = reshape(y,,yn);
  69. yd = ;
  70. sizey = yd;
  71. end
  72. end
  73.  
  74. % determine whether not-a-knot or clamped end conditions are to be used:
  75. nstart = n+length(nanx);
  76. if yn==nstart
  77. endslopes = [];
  78. elseif nargout==&&yn==nstart+
  79. endslopes = y(:,[ n+]); y(:,[ n+])=[];
  80. if any(isnan(endslopes))
  81. error(message('MATLAB:chckxy:EndslopeNaN'))
  82. end
  83. if any(isinf(endslopes))
  84. error(message('MATLAB:chckxy:EndslopeInf'))
  85. end
  86. else
  87. error(message('MATLAB:chckxy:NumSitesMismatchValues',nstart, yn))
  88. end
  89.  
  90. % deal with NaN's among the values:
  91. if ~isempty(nanx)
  92. y(:,nanx) = [];
  93. end
  94.  
  95. y=y(:,ind);
  96. nany = find(sum(isnan(y),));
  97. if ~isempty(nany)
  98. y(:,nany) = []; x(nany) = [];
  99. warning(message('MATLAB:chckxy:IgnoreNaN'))
  100. n = length(x);
  101. if n<
  102. error(message('MATLAB:chckxy:NotEnoughPts'))
  103. end
  104. end
  1. function [x,y,sizey,endslopes] = mychckxy(x,y)
  2. %CHCKXY check and adjust input for SPLINE and PCHIP
  3. % [X,Y,SIZEY] = CHCKXY(X,Y) checks the data sites X and corresponding data
  4. % values Y, making certain that there are exactly as many sites as values,
  5. % that no two data sites are the same, removing any data points that involve
  6. % NaNs, reordering the sites if necessary to ensure that X is a strictly
  7. % increasing row vector and reordering the data values correspondingly,
  8. % and reshaping Y if necessary to make sure that it is a matrix, with Y(:,j)
  9. % the data value corresponding to the data site X(j), and with SIZEY the
  10. % actual dimensions of the given values.
  11. % This call to CHCKXY is suitable for PCHIP.
  12. %
  13. % [X,Y,SIZEY,ENDSLOPES] = CHCKXY(X,Y) also considers the possibility that
  14. % there are two more data values than there are data sites.
  15. % If there are, then the first and the last data value are removed from Y
  16. % and returned separately as ENDSLOPES. Otherwise, an empty ENDSLOPES is
  17. % returned. This call to CHCKXY is suitable for SPLINE.
  18. %
  19. % See also PCHIP, SPLINE.
  20.  
  21. % Copyright 1984-2011 The MathWorks, Inc.
  22.  
  23. % make sure X is a vector:
  24. if length(find(size(x)>1))>1
  25. error(message('MATLAB:chckxy:XNotVector'))
  26. end
  27.  
  28. % ensure X is real
  29. if any(~isreal(x))
  30. error(message('MATLAB:chckxy:XComplex'))
  31. end
  32.  
  33. % deal with NaN's among the sites:
  34. nanx = find(isnan(x));
  35. if ~isempty(nanx)
  36. x(nanx) = [];
  37. warning(message('MATLAB:chckxy:nan'))
  38. end
  39.  
  40. n=length(x);
  41. if n<2
  42. error(message('MATLAB:chckxy:NotEnoughPts'))
  43. end
  44.  
  45. % re-sort, if needed, to ensure strictly increasing site sequence:
  46. x=x(:).';
  47. dx = diff(x);
  48.  
  49. if any(dx<0), [x,ind] = sort(x); dx = diff(x); else ind=1:n; end
  50.  
  51. if ~all(dx), error(message('MATLAB:chckxy:RepeatedSites')), end
  52.  
  53. % if Y is ND, reshape it to a matrix by combining all dimensions but the last:
  54. sizey = size(y);
  55.  
  56. while length(sizey)>2&&sizey(end)==1, sizey(end) = []; end
  57.  
  58. yn = sizey(end);
  59. sizey(end)=[];
  60. yd = prod(sizey);
  61.  
  62. if length(sizey)>1
  63. y = reshape(y,yd,yn);
  64. else
  65. % if Y happens to be a column matrix, change it to the expected row matrix.
  66. if yn==1
  67. yn = yd;
  68. y = reshape(y,1,yn);
  69. yd = 1;
  70. sizey = yd;
  71. end
  72. end
  73.  
  74. % determine whether not-a-knot or clamped end conditions are to be used:
  75. nstart = n+length(nanx);
  76. if yn==nstart
  77. endslopes = [];
  78. elseif nargout==4&&yn==nstart+2
  79. endslopes = y(:,[1 n+2]); y(:,[1 n+2])=[];
  80. if any(isnan(endslopes))
  81. error(message('MATLAB:chckxy:EndslopeNaN'))
  82. end
  83. if any(isinf(endslopes))
  84. error(message('MATLAB:chckxy:EndslopeInf'))
  85. end
  86. else
  87. error(message('MATLAB:chckxy:NumSitesMismatchValues',nstart, yn))
  88. end
  89.  
  90. % deal with NaN's among the values:
  91. if ~isempty(nanx)
  92. y(:,nanx) = [];
  93. end
  94.  
  95. y=y(:,ind);
  96. nany = find(sum(isnan(y),1));
  97. if ~isempty(nany)
  98. y(:,nany) = []; x(nany) = [];
  99. warning(message('MATLAB:chckxy:IgnoreNaN'))
  100. n = length(x);
  101. if n<2
  102. error(message('MATLAB:chckxy:NotEnoughPts'))
  103. end
  104. end

ps:说明下,由于这两个文件都是matlab的工具文件,所以chckxy.m在调用时,改了名字叫做mychckxy.m,相应的文件名字也需要改。

做一个简单的测试,做一个调用:

  1. clc;
  2. clear all;
  3. close all;
  4. x = 0:10;
  5. y = sin(x);
  6. xx = 0:.25:10;
  7. yy = spline(x,y,xx)
  8. plot(x,y,'o',xx,yy);

运行结果:

到此为止,都是准备工作做,下面开始介绍如何在vs中调用spline函数。

1)在matlab中输入命令 mbuild -setup , 运行结果如下图所示, 按照提示选择编译器 vs2010.

  1. mbuild -setup

然后键入:mex -setup 命令,运行结果如下图所示,按照提示选择编译器 vs2010

  1. mex -setup

然后在matlab命令窗口输入:

  1. mcc -W cpplib:libspline -T link:lib spline.m

spline是名字,会根据.m文件的不同而不同!!!

或者输入:mcc -B csharedlib:name name.m

可以得到如下图这些文件:

依然,其中的"libspline.dll"、"libspline.h"和"libspline.lib"这三个文件是我们所需的。

2)打开vs2010建一个控制台应用程序,可以选择一个空的控制台应用程序。

创建程序之后把第一步中得到的三个文件copy到工程中。

由于我的电脑是win 7 64bit(win8 64bit),matlab是64bit,所以应该选择x64,而不是win32平台。

a)修改平台参数,为x64

  1. 生成 ---> 配置管理器

b)配置包含目录与库目录

  1. 项目 ----> 属性 ----> vc++目录

包含目录:

  1. D:\Program Files\MATLAB\R2012a\extern\include

库目录:

  1. D:\Program Files\MATLAB\R2012a\extern\lib\win64\microsoft

C1)配置附加依赖项

右键MatlabTest解决方案->属性->链接器->输入

在“附加依赖项中”中添加相应的静态链接库文件。对于需要添加的静态库文件的数量和名称,根据需要添加。

libmx.lib

libeng.lib

libmex.lib

libmat.lib

…………

根据需要后续补上。

c2)配置附加依赖项 , 这里根据项目的不同,依赖的文件不同,这里测试依赖的是"mclmcrrt.lib"和"libspline.lib"这两个lib,第一是库lib,第二个是我们生成的lib.文件。所依赖的lib文件在库目录已经说明了,

路径为:D:\Program Files\MATLAB\R2012a\extern\lib\win64\microsoft下。

这里有两种解决方案,第一种在vs中配置。

第一种在vs中配置。建议采用第二种方法!!!!因为第一种不同链接库配置的lib会不一样

  1. 项目 ----> 属性 ----> 连接器 ----> 输入

第二种方法是,在文件中直接引入lib文件。

做完以上工作后,我们新建一个主函数作为入口函数,具体测试代码如下:

  1. #include "libspline.h" //增加头文件
  2. #include <cmath>
  3. #include <iostream>
  4. #include <iomanip>
  5. using namespace std;
  6.  
  7. #pragma comment(lib,"mclmcrrt.lib")
  8. #pragma comment(lib,"libspline.lib")
  9.  
  10. int main()
  11. {
  12. //初始化lib(必须)
  13. if (!libsplineInitialize())
  14. return -1;
  15.  
  16. int i, j;
  17. double x[1][11], y[1][11];
  18. for(i=0; i<11; i++)
  19. {
  20. x[0][i] = i;
  21. y[0][i] = sin(x[0][i]);
  22. }
  23.  
  24. double xx[1][41];
  25. for(i=0; i<41; i++)
  26. xx[0][i] = i*0.25;
  27.  
  28. double yy[1][41];
  29.  
  30. mwArray mwX(1,11,mxDOUBLE_CLASS);
  31. mwArray mwY(1,11,mxDOUBLE_CLASS);
  32. mwArray mwXX(1,41,mxDOUBLE_CLASS);
  33. mwArray mwYY(1,41,mxDOUBLE_CLASS);
  34. mwX.SetData(*x, 11);
  35. mwY.SetData(*y, 11);
  36. mwXX.SetData(*xx, 41);
  37. mwYY.SetData(*yy, 41);
  38.  
  39. spline(1, mwYY, mwX, mwY, mwXX); //调用spline
  40.  
  41. cout<<"yy = "<<endl;
  42. i = 0;
  43. for(j = 0; j < 41; j++)
  44. {
  45. //Get第一个参数表示用1个下标访问元素,j+1是列号(MATLAB下标从1开始,而C++从0开始,故做+1操作)
  46. yy[0][j] = mwYY.Get(1,j+1);
  47. cout<<setprecision(4)<<right<<setw(10)<<yy[0][j];
  48. i++;
  49. if(i%7 == 0) cout<<endl; //换行
  50. }
  51. cout<<endl;
  52.  
  53. //终止调用
  54. libsplineTerminate();
  55.  
  56. return 0;
  57. }

运行结果如图:

比较这个结果与最开始我们测试matlab运行的结果,测试通过。matlab配置完成。

ps说明:配置过程中遇到的问题:

配置时经常遇到 LINK2019的错误。这种错误就是典型的lib缺失导入的问题。

  1. main.obj : error LNK2019: 无法解析的外部符号 mclGetMatrix_proxy,该符号在函数 "public: __cdecl mwArray::mwArray(unsigned __int64,unsigned __int64,enum mxClassID,enum mxComplexity)" (??0mwArray@@QEAA@_K0W4mxClassID@@W4mxComplexity@@@Z) 中被引用
  2. 1>main.obj : error LNK2019: 无法解析的外部符号 mclcppGetLastError_proxy,该符号在函数 "public: static void __cdecl mwException::raise_error(void)" (?raise_error@mwException@@SAXXZ) 中被引用
  3. 1>main.obj : error LNK2019: 无法解析的外部符号 mclcppCreateError_proxy,该符号在函数 "public: __cdecl mwException::mwException(void)" (??0mwException@@QEAA@XZ) 中被引用
  4. 1>main.obj : error LNK2019: 无法解析的外部符号 ref_count_obj_addref_proxy,该符号在函数 "public: __cdecl mwException::mwException(class mwException const &)" (??0mwException@@QEAA@AEBV0@@Z) 中被引用
  5. 1>main.obj : error LNK2019: 无法解析的外部符号 ref_count_obj_release_proxy,该符号在函数 "public: virtual __cdecl mwException::~mwException(void)" (??1mwException@@UEAA@XZ) 中被引用
  6. 1>main.obj : error LNK2019: 无法解析的外部符号 error_info_get_message_proxy,该符号在函数 "public: virtual char const * __cdecl mwException::what(void)const " (?what@mwException@@UEBAPEBDXZ) 中被引用
  7. 1>main.obj : error LNK2019: 无法解析的外部符号 array_ref_getV_int_proxy,该符号在函数 "public: class mwArray __cdecl mwArray::GetPromoted(unsigned __int64,...)" (?GetPromoted@mwArray@@QEAA?AV1@_KZZ) 中被引用
  8. 1>main.obj : error LNK2019: 无法解析的外部符号 array_ref_set_numeric_mxDouble_proxy,该符号在函数 "public: void __cdecl mwArray::SetData(double *,unsigned __int64)" (?SetData@mwArray@@QEAAXPEAN_K@Z) 中被引用
  9. 1>main.obj : error LNK2019: 无法解析的外部符号 array_ref_get_numeric_mxDouble_proxy,该符号在函数 "public: __cdecl mwArray::operator double(void)const " (??BmwArray@@QEBANXZ) 中被引用

这里是因为缺少:mclmcrrt.lib

  1. #pragma comment(lib,"mclmcrrt.lib")

即可解决。

matlab 2012 vs2010混合编程的更多相关文章

  1. 算法库:Matlab与C++混合编程

    算法库:Matlab与C++混合编程 最近做光流算法预演过程中,下载的源码中涉及到了Matlab和C++的混合编程.在同事Matlab2014的环境下,程序到是一下就运行通过了.但在我这Matlab2 ...

  2. Matlab与.NET混合编程解决人脸识别问题

    原文:[原创]Matlab与.NET混合编程解决人脸识别问题 如果这些文章对你有用,有帮助,期待更多开源组件介绍,请不要吝啬手中的鼠标. [原创分享]Matlab.NET混编调用Figure窗体 ht ...

  3. 【目录】Matlab和C#混合编程文章目录

    本博客所有文章分类的总目录链接:[总目录]本博客博文总目录-实时更新 1.Matlab和C#混合编程文章目录 9.接触Matlab10年后的一个总结,随时使用Matlab要掌握的一些要点 8.国内第一 ...

  4. Matlab与C++混合编程(依赖OpenCV)

    Matlab与C++混合编程实际上就是通过Matlab的Mex工具将C++的代码编译成Matlab支持调用的可执行文件和函数接口.这样一方面可以在Matlab中利用已经编写好的函数,尽管这个函数是用C ...

  5. matlab与vs混合编程/matlab移植

    前言 项目算法中包含了不同编译工具的代码,分别是matlab和VS,需要将二者结合起来,统一在同一个系统工作,此时就要用到matlab和vs混合编程. 在matlab中将.m文件编译生成库文件等供外部 ...

  6. matlab和c++混合编程---matlab和vs的环境配置问题及方法和步骤(转载)

    matlab和c++混合编程---方法和步骤 matlab和c++混合编程---matlab和vs的环境配置问题 摘要:Matlab具有很强的数值计算和分析等能力,而C/C++是目前最为流行的高级程序 ...

  7. [转] Matlab与C++混合编程(依赖OpenCV)

    作者 zouxy09@qq.com,原文 Matlab与C++混合编程(依赖OpenCV) 之前在运行别人论文的代码的时候,经常有遇到Matlab与C++混合编程的影子.实际上就是通过Matlab的M ...

  8. [转] Matlab与C++混合编程,添加OpenCV库

    原文地址 峰回璐转 最近在做运动医学软件优化工作,此款软件框架及算法语言全由matlab实现,虽然matlab矩阵运算.数值计算能力强大,但速度让人难以忍 受.软件立刻移植到C++上又不太实际,故采用 ...

  9. Matlab与C++混合编程,添加OpenCV库

    最近在做运动医学软件优化工作,此款软件框架及算法语言全由matlab实现,虽然matlab矩阵运算.数值计算能力强大,但速度让人难以忍受.软件立刻移植到C++上又不太实际,故采用联合编程的方式,速度难 ...

随机推荐

  1. hibernate模块

    hibernate-core : 核心模块,定义了 ORM 特性和API,还有各种集成的SPIs. hibernate-entitymanager : 定义 对 JPA(Java Persistenc ...

  2. x+y = ((x&y)<<1) + (x^y) 证明

    法一:我们考虑x,y在二进制表示时候,按位相加其中第i位xi+yi = ((xi&yi)<<1) + (xi^yi)其中(xi&yi)<<1表示当xi和yi都是 ...

  3. js里面获取三位不重复值

    <html><body> <script type="text/javascript"> var d = new Date();var sz = ...

  4. VB6.0调用DLL

    目录 第1章 VB6.0调用DLL    1 1 VC++编写DLL    1 1.1 使用__stdcall    1 1.2 使用 .DEF 文件    1 2 简单数据类型    2 2.1 传 ...

  5. UTF-7编码

    目录 1 编码    1 2 编码代码(C++)    2 3 解码代码(C++)    4 4 测试代码(VC++)    7 1 编码 UTF-7编码的规则及特点为: 1)UTF16小于等于 0x ...

  6. 笔记8:winfrom连接数据库DBHelp

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  7. 补交git、ssh

    本来应该早就应该交的,自己给忘记了,非常抱歉,现在补交上来 词频统计: 代码地址:https://coding.net/u/liuff/p/cipin/git ssh:git@git.coding.n ...

  8. HDUOJ--------A simple stone game(尼姆博弈扩展)(2008北京现场赛A题)

    A simple stone game                                                                                  ...

  9. HDUOJ---1236 排名(浙大考研题)

    排名 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submissi ...

  10. IDEA配置maven

    步骤:Setting....或Ctrl+Alt+S