324 Reputation

2 Badges

14 years, 182 days

MaplePrimes Activity

These are answers submitted by Rogerb

That's the one! Thanks fred

Hi John

sorry the loop i showed you is not for maple but rather for C. I was hoping someone could see the problem with the for lop.


The objective is to output the element in the array k[a,b], which has the highest number.  K from k1,1] to k[20,20] all have values, e.g. k[5,5]=6. In the loop i compare the elements with the array with each other, the element with the greatest value's value is assigned to k[2,3], whilst the a and b value at which this occurs is stored in

k[2,1] and k[2,2] respectively.

wow thanks alot for the thorough explanation acer

hi basically lets say

A:=( a[1,1] ,  a[1,2 )             
         a[2,1] , a[2,2]


C := ( a[1,1] ,  0 )              B:= ( 3,  0 )         
          a[2,1] ,  0                          4 ,  4


i want to equate the entries of C to B, so a[1,1]:=2, a[2,1]:=3 alone, this happens but the info is not passed to A, i used the command


but when i ask for the value of A, it appears that the values of a[i,j] are not assigned, why not?

the problem is the assign function does not work well because i am equating a matrix aparse matrices with entries for matrix A such as a[1,3] or a[2,3] but when the loop comes to a zero entry, it sets that entry to the value on the right which could linear values for matrix B such as entry b[1,3] could equal 5, and then the routines sets zero to 5, strange.
but say i had x in the a[2,3] position and 5 in b[2,3], i'm looking to have x set to 5, when i do the matrix equating function, and so, when i type x anywhere in my maple program it will return x=5, thanks
Yours stars guys, thank you vvery much
Thank you guys your advices worked a treat, i really appreciate it.
Hi John thanks for that you are fantastic, but now i can't assign l afterwards. What i am looking to do is assign both l and p, to get the end result that k[1,2]=0 and k[2,2]=0 please ignore the expression in p where k[1,2]=0, k[1,2]=0 should be ascertained from comparing coefficients i tried assigning l after p, but it doesn't work.
Hi that problem is sorted
Hi there i've come across a silly problem here i have included the relations S={commutator(x1,x2)=expand(commutator(x1,x2)),expand(commutator(x1,x2))=x1} so when i use the simplify (commutator(x1,x2),S); Is there any reasons why i don't get the ouput x1?
Hi John Sorry for the confusion, but your suggestions have solved the problem, thanks for all the help
Hi So i want d to represent a map, and x to be an element of the algebra A. A is spanned by 2 elements x and y, and since d:A->A, d(x)=ax+by, will be a linear combination of x and y, where a and b are constants so when i place dx into the commutator function, i want dx, to be replaced with the linear combination of x and y, before being placed into the commutator function, so Commutator(dx,y)=Commutator(ax+by,y)=a*Commutator(x,y) That is the result i am trying to get when i place that into the simplify function along with the set T, which has the relation d(x)=ax+by, thanks. simplify(Commutator(dx,y),T)=a*Commutator(x,y)
Hi I've come across an even trickier problem which i doubt can be rectified, but it's worth a shot i am using the simplifyed command with set of relations, one of the relations is dx=ax+by, not when i use this command commutator(dx,y), i need dx, to be expanded, before the carries out it's procedure, but as you guessed it, the commutator takes dx, so dx*y-y*dx, and then it expands it. Is there anyway around this problem?
Oh i've found out, thanks
1 2 Page 2 of 2