const Matrix tmp = args(0).matrix_value();
//A_M = mxGetM(prhs[0]);
A_M = tmp.rows();
//A_N = mxGetN(prhs[0]);
A_N = tmp.cols();
//A = mxGetPr(prhs[0]);
A = (double*) tmp.fortran_vec();
Solved my problem.
Yes, but the last line probably made a copy of the data with this last
line with the cast to (double *)!! Try adding A.print_info() after and
see what value rep->count has... If it is "1" you've made a copy..
D.
I did a A[0] = 0.0; and the 1st element of the input parameter was
changed to 0 after I