I tried to place m + 22 for each matrix element. The matrix has N rows and one column.

Code
#define N  31
var m;
mat TrackingErrorMatrix = matrix(N,1);
for(m = 0; m < N; m++)
{
    me(TrackingErrorMatrix, m, 0) = m + 22;
}


But I got the following error code:
Code
Strategy compiling.........
Error in 'line 138: 
illegal indirection
<  me(TrackingErrorMatrix, m, 0) = m + 22;
 >.


I try to search the manual about this error but I am not able to find any. In fact, the manual also assign to each element by using the me() function.

In manual:
Code
for(i=0; i < A->rows; i++)
    for(j=0; j < A->cols; j++)
      me(A,i,j) = i+j;


Last edited by vicknick; 01/05/25 15:10.