MathGroup Archive 2003

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

Search the Archive

Distance between residues

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41288] Distance between residues
  • From: rchoy at ula.ve
  • Date: Tue, 13 May 2003 04:19:36 -0400 (EDT)
  • Reply-to: rchoy at ula.ve
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm trying to calculate the euclidean distances between elements of a
matrix, for example:

d=Sqrt[(x[i]-x[j])^2+(y[i]-y[j])^2], (and i is the element [[1,1]] and j
is the element 
[[1,2]], as an example). Also the code in Mathematica (that i have) would be:

d=Sqrt[(m[[i,1]]+m[[k,1]])^2+(m[[i,2]]+m[[k,2]])^2].

I have tried with Do, For, Table and While, but I haven't been able to do 
this (in a iterative 
way), any ideas?

Thanks a lot,

Rebeca





  • Prev by Date: Re: Spirals and arc length
  • Next by Date: Count pattern
  • Previous by thread: Re: Spirals and arc length--my stupidity
  • Next by thread: Re: Distance between residues