Vector Answer 1 (GNU Emacs Calc Manual)

Next: , Previous: , Up: Answers to Exercises [Contents][Index]


2.7.14 Vector Tutorial Exercise 1

Duplicate the vector, compute its length, then divide the vector by its length: RET A /.

1: [1, 2, 3] 2: [1, 2, 3] 1: [0.27, 0.53, 0.80] 1: 1.
 . 1: 3.74165738677 . .
 .
 r 1 RET A / A

The final A command shows that the normalized vector does indeed have unit length.

AltStyle によって変換されたページ (->オリジナル) /