Question: Filling Matrix

I want to fill a matrix m by m with elements

1) the elements under the diagonal comes from the expression

Gama:=(i, k)→evalf(((x[k]-x[i])*xdot[k]-(y[k]-y[i])*ydot[k])*dtheta[i]/((x[k]-x[i])+(y[k]-y[i])^2))

2) the elements in the diagonal comes from Lambada:=(i)→-sum(Gama, k=1..M), where i<>k

3) the elements above the diagonal from i<k<i+8 comes from Gama(i,k)-(-1)^k-i*W[k-i]

4) th elements from i+8<-k<-i+14 comes from Gama(i,k)-(-1)^k-i*W[14-k+i]

5) the elements from i+14<k<M comes from the expression Gama[i,k]


 

Please Wait...