serena88

110 Reputation

7 Badges

12 years, 327 days

MaplePrimes Activity


These are replies submitted by serena88

@Joe Riel 

Hello, this is an example of what I am trying to achieve :

AA:=Matrix([[4,3,1],[5,3,6]]);
BB:=map(cos,AA*theta);
CC:=Matrix([[3,1,1],[7,4,3]]);

I would like to substitute the thetas with the value of CC into BB, to achieve as follow :

DD:=Matrix([[cos(4*3),cos(3*1),cos(1*1)],[cos(5*3),cos(3*4),cos(6*3)]])

May I know how could I replace the theta in each BB with the corresponding CC values? Thanks.

Forgotten to add that I am solving a matrix, would like the function element wise. Thanks.

Sorry for the confusion, I found out how I could do it. Answer >>>> [8x+3][1,1]

Hi, I am currently doing it this way by giving it a new name, is there a way where i can do it with the same name?

with(LinearAlgebra):
QQQ5:=Matrix(9):
QQQ:=RandomMatrix(9):
QQQ5(1..9,1):=QQQ(1..9,9):
QQQ5(1..9,2..9):=QQQ(1..9,1..8):
QQQ5

what happens if my random matrix gets bigger, and my b[6..15,1]:=j[[13,12,11,10,9,8,7,6,5,4],1]? Is there a way where I can write the values 13 to 4 in a decending order in a simplified manner?

what happens if my random matrix gets bigger, and my b[6..15,1]:=j[[13,12,11,10,9,8,7,6,5,4],1]? Is there a way where I can write the values 13 to 4 in a decending order in a simplified manner?

Hi, thanks, but I do not really understand after reading the help page. Could you please provide an example for me.

Hi, thanks, but I do not really understand after reading the help page. Could you please provide an example for me.

Hi, is anyone else having this problem as well or is it just me? Do you know how could I get in touch with Maple to fix it or for advice?

Hi, thank you for your answer. I would like to ask a continious question.

How do i find the particular value in A[1]?

I have A[1], A[2], A[3] ... A[21]
If I would like to specify the particular value for example, I would like A[1], particular value at matrix coordinate (3,3) or A[5], particular matrix coordinate (7,2), how do I do that please?

Please help. Thanks.

Hi, thank you for your answer. I would like to ask a continious question.

How do i find the particular value in A[1]?

I have A[1], A[2], A[3] ... A[21]
If I would like to specify the particular value for example, I would like A[1], particular value at matrix coordinate (3,3) or A[5], particular matrix coordinate (7,2), how do I do that please?

Please help. Thanks.

I am able to click into the file despite the worksheet error, is it just because I have it in my computer or could anyone else download the file too?

Hi, Thanks for the answer, but if I have many seq, is there a simplier way to do it? This is what I did:

Ckmax:=20:
nPmax:=19:
ZLambda is a 18x18 matrix
node:=9

In matlab (tryin to model this into maple):

for m=1:Cknmax
  Ctail=zeros(node*2);
 for i=1:min(m-1,nPmax)
  Ctail=A(:,:,m-i+1)*P(:,:,i+1);
 end
  Ck(:,:,m+1)=M*A(:,:,m)+Ctail;
  P(:,:,m+1)=zeros(node*2);
 for i=1:node*2
   for j=1:node*2
     A(i,j,m+1)=Ck(i,j,m+1)/(ZLambda(i,i)-ZLambda(j,j)-2*m);
   end
 end
end

I try to do it in maple:

 Ck:=[seq(Matrix(node*2,node*2),i=1..(Ckmax+1))]:
for m from 1 to Ckmax do
Ctail:=Matrix(node*2);
  for i from min(m-1,nPmax) do
  A:=seq[(Matrix(node*2,node*2),i=1..(m-i+1))]:
  P:=seq[(Matrix(node*2,node*2),i=1..(i+1))]:
  Ctail:=A.P
  end do:
    Ck[m+1]:=M.A[m]+Ctail;
    P[m+1]:=Matrix(node*1);
  for i from 1 to (node*2) do
    for j form 1 to (node*2) do
    A(##### I DON'T KNOW HOW TO WRITE #####
    end do:
  end do:
end do:

 

Please help. Thanks.

 

 

Hi, Thanks for the answer, but if I have many seq, is there a simplier way to do it? This is what I did:

Ckmax:=20:
nPmax:=19:
ZLambda is a 18x18 matrix
node:=9

In matlab (tryin to model this into maple):

for m=1:Cknmax
  Ctail=zeros(node*2);
 for i=1:min(m-1,nPmax)
  Ctail=A(:,:,m-i+1)*P(:,:,i+1);
 end
  Ck(:,:,m+1)=M*A(:,:,m)+Ctail;
  P(:,:,m+1)=zeros(node*2);
 for i=1:node*2
   for j=1:node*2
     A(i,j,m+1)=Ck(i,j,m+1)/(ZLambda(i,i)-ZLambda(j,j)-2*m);
   end
 end
end

I try to do it in maple:

 Ck:=[seq(Matrix(node*2,node*2),i=1..(Ckmax+1))]:
for m from 1 to Ckmax do
Ctail:=Matrix(node*2);
  for i from min(m-1,nPmax) do
  A:=seq[(Matrix(node*2,node*2),i=1..(m-i+1))]:
  P:=seq[(Matrix(node*2,node*2),i=1..(i+1))]:
  Ctail:=A.P
  end do:
    Ck[m+1]:=M.A[m]+Ctail;
    P[m+1]:=Matrix(node*1);
  for i from 1 to (node*2) do
    for j form 1 to (node*2) do
    A(##### I DON'T KNOW HOW TO WRITE #####
    end do:
  end do:
end do:

 

Please help. Thanks.

 

 

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"?

1 2 3 4 5 6 Page 1 of 6