Question: Sums of the Vector's Components

February 06 2013 trottaleonardo 5
Maple

0

Hi, I use Maple 13 and have this issue to solve.

In an archive.txt there is the following Vector:

-1/64*cosdincl^2*cos(2*ele-2*g-2*anom-2*w)
+1/16*sinfJ*cosfK*sindincl*cos(2*ele+g-h+om-2*anom-2*w)
-1/16*sinfJ*sinfK*cosdincl*cos(2*ele-g-2*h+2*om-2*anom-2*w)
+1/16*sinfJ*cosfK*sindincl*cos(2*ele-g-h+om-2*anom-2*w)
-1/16*sinfJ*sinfK*cosdincl*cos(2*ele-g+2*h-2*om-2*anom-2*w)
+1/16*sinfJ*cosfK*sindincl*cos(2*ele-g+h-om-2*anom-2*w)
+1/128*cos(2*ele+2*g-2*h+2*om-2*anom-2*w)
(...) etc.
What I want to do is:
vec:=ImportVector("home/demac/...archive.txt");
Then convert this vector in a way I have the sums of the components, like this:
expr:=-1/64*cosdincl^2*cos(2*ele-2*g-2*anom-2*w)+1/16*sinfJ*cosfK*sindincl*cos(2*ele+g-h+om-2*anom-2*w)-1/16*sinfJ*sinfK*cosdincl*cos(2*ele-g-2*h+2*om-2*anom-2*w)+1/16*sinfJ*cosfK*sindincl*cos(2*ele-g-h+om-2*anom-2*w)+(...)
See that the negaitve components still negative;
 
How can I do that?
 
Thnx for the help.
Please Wait...