How to make a mathematica code with vectors and magnitude

Click For Summary
The discussion focuses on creating a Mathematica code to add an arbitrary number of 3D vectors based on their lengths and angles with the x, y, and z axes. The code should compute the resultant vector's magnitude and the angles it makes with the axes, as well as plot the resultant vector. Participants express uncertainty about how to relate the angles to the vector components and magnitude. Clarification is sought on the mathematical relationships between these elements. The conversation emphasizes the need for a clear understanding of vector addition in three-dimensional space.
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
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?
 
Thread 'Correct statement about size of wire to produce larger extension'
The answer is (B) but I don't really understand why. Based on formula of Young Modulus: $$x=\frac{FL}{AE}$$ The second wire made of the same material so it means they have same Young Modulus. Larger extension means larger value of ##x## so to get larger value of ##x## we can increase ##F## and ##L## and decrease ##A## I am not sure whether there is change in ##F## for first and second wire so I will just assume ##F## does not change. It leaves (B) and (C) as possible options so why is (C)...

Similar threads

  • · Replies 3 ·
Replies
3
Views
966
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 0 ·
Replies
0
Views
615
  • · Replies 9 ·
Replies
9
Views
4K