How can I compute the distance formula between two specific atoms when these two atoms have different xyz coordinates each time?

4 次查看(过去 30 天)
I have similar data table to this:
A = 10x3
C -0.7146 0.5304 -1.1481
C -1.1512 0.7561 0.4465
C 0.9622 1.8652 0.1832
C 0.2667 0.1483 -0.5122
C -1.0791 -2.5351 -0.7354
H -1.2107 1.7495 -1.6239
H -0.3533 -0.4565 -1.5120
H 1.8556 -0.3747 -0.2835
C 0.5873 -0.5978 -1.3833
C 0.3756 -1.4333 -1.3172
A = 10×3
C -0.8346 0.6204 -1.0881
C -1.7712 0.7661 0.5565
C 0.7822 1.0052 0.6832
C 0.2667 0.1483 -0.5122
C -1.0791 -2.5351 -0.7354
H -1.2111 1.7295 -1.1001
H -0.3422 -0.4733 -1.7731
H 1.8661 -0.3617 -0.2881
C 0.5611 -0.5272 -1.0844
C 0.8742 -1.9703 -1.8312
And this data is repeated 20 times with different values of xyz coordinates each time, so I want to pick up only the second row and the fourth row and calculate the distance formula for these two points of each data table. so the result has to be 20 answers of distances. How can I do that, please? I don’t know if this needs loop and how?
  13 个评论

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by