davemaple

5 Reputation

2 Badges

14 years, 130 days

MaplePrimes Activity


These are replies submitted by davemaple

Oh yes, i see. that makes sense. I have to insert this into a matrix though and i need to keep the I in, is there some way i can do that? or will i have to do it manually as i have below?

So far i have:

>Xi:=sqrt(I);

#Bs := matrix([[Re(Xi), Im(Xi)], [Im(Xi), Re(Xi)]]);

Bs := matrix([[Re(Xi), (Xi-1/sqrt(2))], [(Xi-1/sqrt(2)), Re(Xi)]]);

Xi:= 1/2*2^(1/2)+1/2*I*2^(1/2)

Bs:=matrix([[1/2*2^(1/2), 1/2*I*2^(1/2)], [1/2*I*2^(1/2), 1/2*2^(1/2)]])

The matrix is how i need it to be, you can see what i've tried to do in the #'d out line of code, ideally i'd like to make that work as it will look better when marked. Or is there some way I can do it using cosines or other identities ive overlooked? the original line of code for a previous question was:

Bs:=matrix([[cos(Xi), sin(Xi)], [-sin(Xi), cos(Xi)]]);

Oh yes, i see. that makes sense. I have to insert this into a matrix though and i need to keep the I in, is there some way i can do that? or will i have to do it manually as i have below?

So far i have:

>Xi:=sqrt(I);

#Bs := matrix([[Re(Xi), Im(Xi)], [Im(Xi), Re(Xi)]]);

Bs := matrix([[Re(Xi), (Xi-1/sqrt(2))], [(Xi-1/sqrt(2)), Re(Xi)]]);

Xi:= 1/2*2^(1/2)+1/2*I*2^(1/2)

Bs:=matrix([[1/2*2^(1/2), 1/2*I*2^(1/2)], [1/2*I*2^(1/2), 1/2*2^(1/2)]])

The matrix is how i need it to be, you can see what i've tried to do in the #'d out line of code, ideally i'd like to make that work as it will look better when marked. Or is there some way I can do it using cosines or other identities ive overlooked? the original line of code for a previous question was:

Bs:=matrix([[cos(Xi), sin(Xi)], [-sin(Xi), cos(Xi)]]);

Page 1 of 1