Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Unevaluated values of a[[i]]+b[[j]]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65233] Re: Unevaluated values of a[[i]]+b[[j]]
  • From: bghiggins at ucdavis.edu
  • Date: Sun, 19 Mar 2006 03:19:10 -0500 (EST)
  • References: <dvgs5h$9oc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Alexandre,

Will this do the trick:

a={3,4,4};b={4,3,8};


myfunc[i_]:=HoldForm[{a1*b1,a1+b1,a1/b1,a1-b1}]/.{a1->a[[
          i]],b1->b[[i]]}


Map[myfunc[#]&,Range[Length[a]]]


{HoldForm[{3*4, 3 + 4, 3/4, 3 - 4}],
  HoldForm[{4*3, 4 + 3, 4/3, 4 - 3}],
  HoldForm[{4*8, 4 + 8, 4/8, 4 - 8}]}

When the output is in StandardForm the Holdform is not visible,

Cheers,

Brian


  • Prev by Date: Re: Re: variance of difference sign test
  • Next by Date: Re: Size of .mx files
  • Previous by thread: Re: Unevaluated values of a[[i]]+b[[j]]
  • Next by thread: Integration Bug