When I used mxDuplicateArray
function, I met this error:
cannot convert double*
to const mxArray* {aka const mxArray_tag*}
for argument 1
to mxArray* mxDuplicateArray(const mxArray*)
.
Is there anyone who knows how to fix it?
This is part of my code:
vector<int> *NNLt;
double *NNLtout;
Vector *V;
Vector *Fb;
mwSize *sn;
mwSize nsn;
mwSize nf;
double hs;
double bw;
double mw;
mwSize ncols;
mwSize i;
double *NNLtoutt;
...
createNNLtriangle(NNLt, V, Fb, sn, nsn, nf, hs, bw, mw);
plhs[0] = mxCreateCellMatrix(nsn,50);
...
for(i=0;i<nsn;i++){
// copy(NNLt[i].begin(),NNLt[i].end(),NNLtout[i*50;i*50+NNLt[i].size()]);
// NNLtoutt=mxCreatStrucMatrix(1,50,1,fnom);
copy(NNLt[i].begin(),NNLt[i].end(),NNLtoutt);
mxSetCell(plhs[0],i,mxDuplicateArray(NNLtoutt));
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…