Question: rearrange matrix variables

hi every one

I need to rearrange the matrix variables after using collect command

R[3, 3] := collect(R[3, 3], z^2);
                                  2             
               (-cos(theta) + 1) z  + cos(theta)
sort(R[3, 3]);
                                  2             
               (-cos(theta) + 1) z  + cos(theta)

i want it to appear as z(1-cos(theta))+cos(theta) ,  can i use sort or sequence or there is another command to do this   ???

Please Wait...