MathGroup Archive 2001

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

Search the Archive

Re: Shortcut for magnitude of a Vector?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26744] Re: Shortcut for magnitude of a Vector?
  • From: adam_smith at my-deja.com
  • Date: Fri, 19 Jan 2001 02:14:19 -0500 (EST)
  • References: <9462eq$gck@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Using the dot prodcut is probably the simplest way.  Try the following


In[1]:=
vec = {vx, vy, vz}
numvec = {3, 4, 5}

Out[1]=
{vx, vy, vz}

Out[2]=
{3, 4, 5}

In[3]:=
Sqrt[vec.vec]
Sqrt[numvec.numvec]

Out[3]=
       2     2     2
Sqrt[vx  + vy  + vz ]

Out[4]=
5 Sqrt[2]

Adam Smith
In article <9462eq$gck at smc.vnet.net>,
  " mrtommorris" <mor3752 at alltel.net> wrote:
> Does anyone know if there is a shortcut to find the magnitude of a
Vector in
> Mathematica?  I've tried a few things but it just spits my vector
back out.
> Thanks for your help.  Tom Morris
>
>


Sent via Deja.com
http://www.deja.com/


  • Prev by Date: algorithm for picking sum of list items
  • Next by Date: complicated recursion relations
  • Previous by thread: RE: Shortcut for magnitude of a Vector?
  • Next by thread: The value of a partial derivative