MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Sign Declaration


 Dear MathGroup,

 Given the list  A= {a,b,c,d,e,f,g,h}, I'd like to
tell
 Mathematica (5.2) that a,b,...,e are +ve, and f,g,h are -ve.

 I'm using the following

          Table[Sign[A[[i]]]^=1,{i,5}];

          Table[Sign[A[[i]]]^=-1,{i,6,8}];


 My queries are :

 1. Is it possible to combine the above into 1
Table[]?

 2. How do I achieve the same thing with the construct

              x/:Sign[x]=1
    in Table ?

 3. Any more efficient ways of doing those sign 
    declarations?

  Thanking you in advance.

  Ajit.

    


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 


  • Prev by Date: Getting CityData[], WorldData[] etc to work through a firewall?
  • Next by Date: Re: FourierTransform of Sign^2 ?
  • Previous by thread: Getting CityData[], WorldData[] etc to work through a firewall?
  • Next by thread: Re: Sign Declaration