serena88

105 Reputation

7 Badges

10 years, 255 days

MaplePrimes Activity


These are replies submitted by serena88

Hi, I am using a nested loops. And the answer that came out is about 158 data, it is not a matrix, just a list of numbers. If I do not want to calculate it one by one, what question should I ask for it to give me the answer "158"?

Hi, I have a 18x18 matrix called Lambda.

I'm trying to get NewLambda which consist of "(Lambda(1,1)-Lambda(2,2))/2", "(Lambda(2,2)-Lambda(3,3))/2", ....

Here is what I wrote :

for i from 1 to 17 do
for j from 2 to 18 do
NewLambda:=((Lambda(i,i)-Lambda(j,j))/2;
end do
end do

But it doesn't show me the NewLambda. Please help. Thanks 

 

Hi, I have a 18x18 matrix called Lambda.

I'm trying to get NewLambda which consist of "(Lambda(1,1)-Lambda(2,2))/2", "(Lambda(2,2)-Lambda(3,3))/2", ....

Here is what I wrote :

for i from 1 to 17 do
for j from 2 to 18 do
NewLambda:=((Lambda(i,i)-Lambda(j,j))/2;
end do
end do

But it doesn't show me the NewLambda. Please help. Thanks 

 

Hi, instead of using fnormal(p), is there a way to insert fnormal to my whole worksheet? I have about 38 equations all in. Please advice. Thanks

Hi, instead of using fnormal(p), is there a way to insert fnormal to my whole worksheet? I have about 38 equations all in. Please advice. Thanks

@acer 

Hi, thanks for your comment. I am trying to add extra equations into the procedure. But the statement "WARNING, `E0E2` is implicitly declared local to procedure `makeE0M`"

This is what i added into the procedure :

restart:
makeEOM:=proc(elenum)
local i, node, nodes, L, E0, E0M,E2,E2M;
   nodes:=elenum*2+1:
   L:=evalf((Pi*2)/(elenum*2)):
   E0:=Matrix([[L/3,2*L/3,L/3],[2*L/3,11*L/15,2*L/3],[L/11,2*L/3,L/110]]):
   E2:=Matrix([[L/13,2*L/13,L/13],[2*L/3,11*L/5,2*L/3],[L/11,2*L/13,L/11]]):  
   E0M:=Matrix(nodes);
   E2M:=Matrix(nodes);
   for i from 1 to elenum do
      node:=(2*(i-1))+1;
      E0M[node..node+2,node..node+2]:=E0M[node..node+2,node..node+2]+E0;
      E2M[node..node+2,node..node+2]:=E2M[node..node+2,node..node+2]+E2;
   end do:
   E0M, E2M;
   E0E2:=evalf((1/E0M).(E2M)):
   J,K:=Eigenvectors(E0E2):
end proc:

What does the warning mean and how can i solve it please?

@acer 

Hi, thanks for your comment. I am trying to add extra equations into the procedure. But the statement "WARNING, `E0E2` is implicitly declared local to procedure `makeE0M`"

This is what i added into the procedure :

restart:
makeEOM:=proc(elenum)
local i, node, nodes, L, E0, E0M,E2,E2M;
   nodes:=elenum*2+1:
   L:=evalf((Pi*2)/(elenum*2)):
   E0:=Matrix([[L/3,2*L/3,L/3],[2*L/3,11*L/15,2*L/3],[L/11,2*L/3,L/110]]):
   E2:=Matrix([[L/13,2*L/13,L/13],[2*L/3,11*L/5,2*L/3],[L/11,2*L/13,L/11]]):  
   E0M:=Matrix(nodes);
   E2M:=Matrix(nodes);
   for i from 1 to elenum do
      node:=(2*(i-1))+1;
      E0M[node..node+2,node..node+2]:=E0M[node..node+2,node..node+2]+E0;
      E2M[node..node+2,node..node+2]:=E2M[node..node+2,node..node+2]+E2;
   end do:
   E0M, E2M;
   E0E2:=evalf((1/E0M).(E2M)):
   J,K:=Eigenvectors(E0E2):
end proc:

What does the warning mean and how can i solve it please?

Hi, thanks for the reply.

If I have E1M, E2M, E3M etc... Can I just put all the different loops into the proc? I tried this but it doesn't work.

restart:
makeEOM:=proc(elenum)
local i, node, nodes, L, E0, E0M,E2,E2M;
   nodes:=elenum*2+1:
   L:=evalf((Pi*2)/(elenum*2)):
   E0:=Matrix([[L/3,2*L/3,L/3],[2*L/3,11*L/15,2*L/3],[L/11,2*L/3,L/110]]):
   E2:=Matrix([[L/13,2*L/13,L/13],[2*L/3,11*L/5,2*L/3],[L/11,2*L/13,L/11]]):   
   E0M:=Matrix(nodes);
   E2M:=Matrix(nodes);
   for i from 1 to elenum do
      node:=(2*(i-1))+1;
      E0M[node..node+2,node..node+2]:=E0M[node..node+2,node..node+2]+E0;
      E2M[node..node+2,node..node+2]:=E2M[node..node+2,node..node+2]+E2;
   end do:
   E0M:
   E2M:
end proc:

I tried using another makeE2M:=proc(elenum) inside, it wouldn't work as well.

Please advice. Thanks

Hi, thanks for the reply.

If I have E1M, E2M, E3M etc... Can I just put all the different loops into the proc? I tried this but it doesn't work.

restart:
makeEOM:=proc(elenum)
local i, node, nodes, L, E0, E0M,E2,E2M;
   nodes:=elenum*2+1:
   L:=evalf((Pi*2)/(elenum*2)):
   E0:=Matrix([[L/3,2*L/3,L/3],[2*L/3,11*L/15,2*L/3],[L/11,2*L/3,L/110]]):
   E2:=Matrix([[L/13,2*L/13,L/13],[2*L/3,11*L/5,2*L/3],[L/11,2*L/13,L/11]]):   
   E0M:=Matrix(nodes);
   E2M:=Matrix(nodes);
   for i from 1 to elenum do
      node:=(2*(i-1))+1;
      E0M[node..node+2,node..node+2]:=E0M[node..node+2,node..node+2]+E0;
      E2M[node..node+2,node..node+2]:=E2M[node..node+2,node..node+2]+E2;
   end do:
   E0M:
   E2M:
end proc:

I tried using another makeE2M:=proc(elenum) inside, it wouldn't work as well.

Please advice. Thanks

Hi, I can't seem to be able to open the link that you sent. can you please send it again. Many thanks,

Serena

Hi, I can't seem to be able to open the link that you sent. can you please send it again. Many thanks,

Serena

Hi, I have quite a silly question, may I know how do i open the worksheet please?

It does not show when i click on it. I tried "save target as" it didn't work as well.

Thanks.

Hi, I have quite a silly question, may I know how do i open the worksheet please?

It does not show when i click on it. I tried "save target as" it didn't work as well.

Thanks.

thanks. it is really helpful

thanks. it is really helpful

1 2 3 4 5 6 Page 2 of 6