fallinwith
2007-12-27, 16:13
在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
>>
#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
>>