← Back to team overview

dolfin team mailing list archive

Matrix assignment

 

Hi
Isn't this code supposed to work? It gives me "invalid lvalue in 
assignment" error while compiling. How should I assign the elements of 
a Matrix???

//-------------------------------
int main()
{


for(i=0; i<nens; i++)
.
.
.
real* values = new real[nstat];
u1.interpolate(values);

Matrix S(nstat,nens);

for(int j=0;j<nstat;j++)
  {
    S(j,i)=values[j];
  }
 
}


Thank you in advance,
Hatef


Follow ups