amrramadaneg

Prof. Amr Ramadan

76 Reputation

8 Badges

13 years, 317 days

MaplePrimes Activity


These are questions asked by amrramadaneg

Dears. I want to evaluate the following expression numerically
G[i]=sum(Gama[i,k], k=1..100, k<>i),
where
Gama=((x[k]-x[i])*xdot[k]+(y[k]-y[i])*ydot[k])*dtheta[i]/((x[k]-x[i])^2+(y[k]-y[i])^2)^2
Dr. Amr

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

Dears, I wrote with maple the following expressions

if i <> k then

for i to M do

for k to M do

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

end do

end do

 

else

beta :=(i)→evalf((1/2)*(y2dot[i]*xdot[i]-x2dot[i]*ydot[i])*dtheta[i]/omega[i]^2-Pi);

end if;

Matrix(M, M, (i, k) →`if`(i = k, beta, alpha);

Hi, 

How can I create a matrix M by M with maple, where the elements of diagonal comes from b[i]=i+1 and the other elements comes from c[i,k]=i+k.

Amr

First 9 10 11 Page 11 of 11