Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Symplify Table

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109034] Re: Symplify Table
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sun, 11 Apr 2010 04:31:14 -0400 (EDT)

Use the "array processing" inherent in functions such as Plus and Times 
that have the attribute of being Listable , namely:

   C = A - (1/2)B

That's it!  (You can do Simplify later. And even there, you don't need 
to do any explicit indexing, but -- at least for a one-dimensional list 
-- just use Map:  Simplify/@C

On 4/10/2010 6:52 AM, John Ertle Jr. wrote:
> I want to subtract array A by 1/2 array B and put it in array C.  I need something like this except more complicated later.  This is what I have thus far:
>
> C:=C=Simplify[Table[A[i]-1/2*B[i],{i,1,9}]]


-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: How do you get Mathematica to evaluate "Floor" to give a number?
  • Next by Date: Re: Symplify Table
  • Previous by thread: Re: Symplify Table
  • Next by thread: Converting the integral of a sum into a sum of integrals