I'm using Octave API in c++ code. I'm creating a double matrix and assigning values from a pointer to the matrix using for loops.

```
Matrix matrix_double = Matrix (iRows,iCols);
for (r=0;r<iRows;r++)
{
for(c=0;c<iCols;c++)
{
matrix_double(r,c)=(pdblReal[r+iRows*c]);
}
}
```

I want to avoid using for loops as much as possible. I tried this-

`matrix_double(*pdblReal,iRows,iCols);`

where pdblReal points to the matrix values. This didn't raise any errors while compiling, the values were not assigned to `matrix_double`

matrix during execution.

Is it possible to assign values to a double (and other data type) matrix using pointers? If yes, what did I do wrong?

This question was listed here also-http://stackoverflow.com/questions/39879458/assigning-values-to-octave-matrix-in-c-code

Regards,

Shamika