MathGroup Archive 2009

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

Search the Archive

using predefined expressions in functions [newbie question]


I've been trying to write a function using some predefined
expressions, but the function assignment seems to understand the
symbols in the expressions as literals. eg.,

R1 := {x1,y1,z1}
R2 := {x2,y2,z2}
f[x1_,y1_,z1_,x2_,y2_,z2_] := R1 . R2


gives the output
x1 x2 + y1 y2 + z1 z2
instead of
32 ( = 1*4 + 2*5 + 3*6 )

Can anyone help me with this?  Thanks for your attention.


  • Prev by Date: Re: Animated Bubble Chart
  • Next by Date: constants
  • Previous by thread: Re: list manipulation
  • Next by thread: Re: using predefined expressions in functions [newbie