components of a vector with sign, having direction and magnitude

4 次查看(过去 30 天)
I have the direction of a vector lets say passing trough [0.3 4 5], [5 7 32] (x,y,z), and the magnitude 45; how can I calculate the components of that vector along x,y and z in an easy way?

采纳的回答

Walter Roberson
Walter Roberson 2022-11-13
take the difference between the endpoints, getting vector components. Divide the vector by the length of the vector. Multiply the result by the desired magnitude. Add the first point to get the resulting point.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by