• Support PF! Buy your school textbooks, materials and every day products Here!

How to make a mathematica code with vectors and magnitude

  • Thread starter Sneakatone
  • Start date
  • #1
318
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 dont know what to do with the angles
 

Answers and Replies

  • #2
20,111
4,191
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?
 

Related Threads on How to make a mathematica code with vectors and magnitude

Replies
12
Views
7K
Replies
3
Views
6K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
4
Views
1K
Replies
14
Views
122
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
13
Views
1K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
5
Views
4K
Replies
3
Views
8K
Top