查看单个帖子
旧 2007-12-27, 16:13   #1
fallinwith
初级会员
 
注册日期: 2007-12-12
帖子: 1
声望力: 0
fallinwith 正向着好的方向发展
默认 【求助】求助"MATLAB.hpp"在那里

在VC中
#include<stdlib.h>
#include<iostream.h>
#include"MATLAB.hpp"

static double data0[]={2,6,4,8};
static double data1[]={1,5,3,7};

int main()
{
mwArray mat0(2,2,data0);
mwArray mat1(2,2,data1);
mwArray mat2;
mat2=rdivide(plus (mat0,mat1),2);
cout<<mat0<<"\n"<<mat1<<"\n"<<mat2<<"\n";
return 1;

}

在MATLAB出现

>> mbuild exam1.cpp
exam1.cpp
exam1.cpp(2) : fatal error C1083: Cannot open include file: 'MATLAB.hpp': No such file or directory

D:\MATLAB7\BIN\WIN32\MEX.PL: Error: Compile of 'exam1.cpp' failed.

??? Error using ==> mbuild
Unable to complete successfully

>>
fallinwith 当前离线   回复时引用此帖