1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How to make a mathematica code with vectors and magnitude

  1. Sep 9, 2013 #1
    1. The problem statement, all variables and given/known data
    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.

    2. Relevant equations

    3. 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 dont know what to do with the angles
  2. jcsd
  3. Sep 9, 2013 #2
    How are the x, y, and z components of a vector related to the magnitude of the vector and the three angles which the vector makes with x, y, and z axes?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted