eifan

10 Reputation

3 Badges

11 years, 301 days

MaplePrimes Activity


These are replies submitted by eifan

I solved this problem, Thank you for all your help!

Could you help me with the new issue? Thank you very much!

Could you help me with the new issue? Thank you very much!

I'm very appreciate for your help, and it really helps. I tried as what you've told me and the combination of 2 & 3 solved my problem.

But here comes another issue. Let me show you my Maple Code first:

with(LinearAlgebra):

with(ArrayTools):
#--------------------------------------------------------------------------
fA:= x->Matrix([[0,1],[-x^2,0]]):
fW:= (x,j)->sin(j*Pi*x):
fm:= j->int(fW(x,j)^2,x=0..1):
fB:= (b,m,j)->Matrix(1,m,[seq(fW(b[i],j)/fm(j),i=1..m)]):
#--------------------------------------------------------------------------
n:= 2:
m:= 2:
b:= [0.1,0.2]:
w:= Matrix(1,m):
for i from 1 to n do
w[1,i]:= i*Pi;
od:
#--------------------------------------------------------------------------
A:= Matrix(2*n,2*n):
B:= Matrix(2*n,m):
for i from 1 to n do
ATem:= fA(w[1,i]);
BTem:= fB(b,m,i);
BlockCopy(ATem,0,2,2,2,A,(i-1)*(4*n+2),2*n,2,2);
BlockCopy(BTem,0,1,1,m,B,2*i-1,2*n,1,m);
od:
#--------------------------------------------------------------------------
M:= Matrix(2*n,2*m*n):
for i from 1 to 2*n do
MTem:= MatrixMatrixMultiply(A^(i-1),B);
BlockCopy(MTem,0,2*n,2*n,m,M,(i-1)*2*m*n,2*n,2*n,m);
od:
MM:= MatrixMatrixMultiply(M,Transpose(M)):
#--------------------------------------------------------------------------
detMM:= Determinant(MM):
traceMM:= Trace(MM):
J:= TraceMM*detMM^(1/n):
evalf(%);

After running this code i get: 

 

This is really annoying that Maple doesn't give the final result again.

Hope to get your reply soon. Thank you!

I'm very appreciate for your help, and it really helps. I tried as what you've told me and the combination of 2 & 3 solved my problem.

But here comes another issue. Let me show you my Maple Code first:

with(LinearAlgebra):

with(ArrayTools):
#--------------------------------------------------------------------------
fA:= x->Matrix([[0,1],[-x^2,0]]):
fW:= (x,j)->sin(j*Pi*x):
fm:= j->int(fW(x,j)^2,x=0..1):
fB:= (b,m,j)->Matrix(1,m,[seq(fW(b[i],j)/fm(j),i=1..m)]):
#--------------------------------------------------------------------------
n:= 2:
m:= 2:
b:= [0.1,0.2]:
w:= Matrix(1,m):
for i from 1 to n do
w[1,i]:= i*Pi;
od:
#--------------------------------------------------------------------------
A:= Matrix(2*n,2*n):
B:= Matrix(2*n,m):
for i from 1 to n do
ATem:= fA(w[1,i]);
BTem:= fB(b,m,i);
BlockCopy(ATem,0,2,2,2,A,(i-1)*(4*n+2),2*n,2,2);
BlockCopy(BTem,0,1,1,m,B,2*i-1,2*n,1,m);
od:
#--------------------------------------------------------------------------
M:= Matrix(2*n,2*m*n):
for i from 1 to 2*n do
MTem:= MatrixMatrixMultiply(A^(i-1),B);
BlockCopy(MTem,0,2*n,2*n,m,M,(i-1)*2*m*n,2*n,2*n,m);
od:
MM:= MatrixMatrixMultiply(M,Transpose(M)):
#--------------------------------------------------------------------------
detMM:= Determinant(MM):
traceMM:= Trace(MM):
J:= TraceMM*detMM^(1/n):
evalf(%);

After running this code i get: 

 

This is really annoying that Maple doesn't give the final result again.

Hope to get your reply soon. Thank you!

Page 1 of 1