How to make a mathematica code with vectors and magnitude

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
Sneakatone
Messages
318
Reaction score
0

Homework Statement


Create a mathematica code to add arbitrary number of 3 dimensional vectors.
1. n: the number of vectors which must be added
2. For each input vector, the code should accept the following:
a. Length of the vector
b. Three angles which the vector makes with x, y, and z axes
Output: The result should be the magnitude and the angles which the resultant vector makes with the x, y, and z axes. Plot the resultant vector.


Homework Equations





The Attempt at a Solution


what you can do is set a variable into a vector like v={1,2,3} and v+(a number)
but I don't know what to do with the angles
 
Physics news on Phys.org