C++调用MATLAB库出现的问题
#include<iostream>
#include<string>
#include"mat.h"
#pragma comment(lib,"libmx.lib")
#pragma comment(lib,"libmat.lib")
using namespace std;
int main
{
MATFile *pMatFile=NULL;
mxArray *pMxArray=NULL;
pMatFile=matOpen("824.mat","r");
pMxArray=matGetVariable(pMatFile,"m");
//dMat1=(double*)mxGetData(pMxArray);
size_t paa=mxGetM(pMxArray);//矩阵行数
size_t pbb=mxGetN(pMxArray);//矩阵列数
double *p=mxGetPr(pMxArray);
//for(int m=0;m<64;m++)
//cout<<*(p+m)<<" ";
cout<<paa<<" "<<pbb<<endl;
system("pause");
return 0;
}