ActiveUser

475 Reputation

10 Badges

6 years, 343 days
i would also not like to ask, but if not ask, what should i do?

MaplePrimes Activity


These are replies submitted by ActiveUser

@Kitonum 

i edit script and try differen length of variables list, but can not find transpose is Equivalent

how to do correctly?

 

with(LinearAlgebra);
with(combinat):
elementss := proc(AA)
local elements1:
elements1 := [op(indets(AA))];
elements1 := [op(elements1), op(indets(AA,float))];
elements1 := [op(elements1),op(indets(AA,constant))];
return elements1:
end proc:
IsEquivalent:=proc(obj1::Matrix, obj2::Matrix, var::list)
local P, S, i, result, SS;
uses combinat, LinearAlgebra;
P:=permute(var);
#print(P):
S:=[seq(subs(zip(`=`,var,p),obj2), p=P)];
#print(S):
SS := choose(S,2);
result := false:
for i from 1 to nops(SS) do
if `or`(seq(Equal(obj1,s), s=SS[i])) then
 result := true:
end if:
od:
return result:
end proc:
A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Transpose(A1);
finish := 0:
for la2 from nops(elementss(A1)) to 2 by -1 do
#print(choose(elementss(A1),la2));
elementbox := choose(elementss(A1),la2):
for la7 from 1 to nops(elementbox) do
if finish = 0 then
result := IsEquivalent(A1, B1, elementbox[la7]):
print(result):
if result = true then
 finish := la2:
end if:
end if:
od:
od:
 

@acer 

i solved after tidy my code

and succeed to verify that there are all one

i use fraction input and simplify output

confirmed that only fraction is exact, it can not use with evalf, evalf has rounding error

@acer 

i sent file to support of maple , phil

You can ask him to give you to look

what is your email?

i can send to you

@acer 

I have replied tom with code 

so not need to retype

You can run with a time series called close3 

then you will see most using fraction as input to eigenvectors are wrong 

@tomleslie 

previous reply from my question,

someone told me to use fraction, but i verify eigenvector result of fraction, it is incorrect

 

originally , start from float value , there is very little difference, not exactly 1.0 after verify then today i test it is exactly one.

 

is it a bug in maple 12 ?

 

@tomleslie 

can you explain why start from fraction and start from floating value, different?

i mean that one columns are all one , another one column is 0.57...,  

which start is the most accurate?

 

why fraction and float are near the same thing, but result has such big difference like totally different thing?

 

which should be used?

 

@ThU 

example is

dsolve([eq2,eq3,eq4,c(t)=fractionoutputofeigenvector],[a(t),b(t),c(t)])

c(t) has result

@Kitonum 

i edited your function for all elements in matrix, but not all cases considered, such as transpose or partly transpose

with(LinearAlgebra);
IsEquivalent:=proc(obj1::Matrix, obj2::Matrix, var::list)
local P, S;
uses combinat, LinearAlgebra;
P:=permute(var);
#print(P):
S:=[seq(subs(zip(`=`,var,p),obj2), p=P)];
#print(S):
SS := choose(S,2);
result := false:
for i from 1 to nops(SS) do
if `or`(seq(Equal(obj1,s), s=SS[i])) then 
 result := true:
end if:
od:
return result:
end proc:
elementss := proc(AA)
local elements1:
elements1 := [op(indets(AA))];
elements1 := [op(elements1), op(indets(AA,float))];
elements1 := [op(elements1),op(indets(AA,constant))];
return elements1:
end proc:
A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Matrix([[777,y,y],[77,7,7],[2,x,x]]);
IsEquivalent(A1, B1, elementss(A1)); # correct
A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Matrix([[777,y,y],[77,7,7],[2,x,y]]);
IsEquivalent(A1, B1, elementss(A1)); # correct

A1 := Matrix([[x,x,x],[77,7,7],[z,y,y]]);
B1 := Matrix([[z,y,y],[77,7,7],[x,x,x]]);
IsEquivalent(A1, B1, elementss(A1)); # incorrect

A1 := Matrix([[x,x,x],[77,7,7],[z,y,y]]);
B1 := Matrix([[z,y,y],[77,7,7],[x,x,y]]);
IsEquivalent(A1, B1, elementss(A1)); # correct

A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Transpose(A1);
IsEquivalent(A1, B1, elementss(A1)); # incorrect

A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Matrix([[777,x,2],[77,7,7],[x,y,y]]);
IsEquivalent(A1, B1, elementss(A1)); # incorrect

A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Matrix([[777,77,2],[x,7,7],[x,y,y]]);
IsEquivalent(A1, B1, elementss(A1)); # incorrect
 

@Kitonum 

i got error when input a list having 3 elements x, y, z

it expects 2 arguments

how to edit the function for more than 2 elements?

@Kitonum 

is there any clues to write the extension?

what things need to consider?

@Kitonum 

 

in maple 12 , it return not true, can it change to run in maple 12?

 

second question is about two operations, such as symmetric flip and then rotate

for example:

IsEquivalent(Matrix([[777,x,x],[77,7,7],[2,y,y]]), Matrix([[777,y,y],[77,7,x],[2,7,x]]), [x,y]);

@Kitonum 

can this express in print or printf to show the operation it recognised ?

because expect to count how many same operations in series.

I have some understanding not clear is that

if there are two or three operations to achieve between two matrix , is it one equivalent can be considered as one operations for two or more operations?

@Joe Riel 

i mean self modifying maple code application

and need a database to record the change

it write maple code itself

@Kitonum 

Not use procedure 

and run directly , it can show animation now

@Kitonum 

do not know why i run in maple 2015 , no result.

 

3 4 5 6 7 8 9 Last Page 5 of 42