- #1
Bostonpancake0
- 42
- 0
Hi,
the question is as follows.
I wish to calculate all of the different possible combinations of two vectors in regards to Pythagoras theorem. Not just an element by element operation
My code is as follows;
opposite=(0:30)
adjacent=(0:30)
hypotenuse=sqrt(x1.^2+y1.^2)
When I use this code it only gives me distances using element by element operation. How might one prevent this from occurring and consider all combinations of adjacent and opposite side lengths?
the question is as follows.
I wish to calculate all of the different possible combinations of two vectors in regards to Pythagoras theorem. Not just an element by element operation
My code is as follows;
opposite=(0:30)
adjacent=(0:30)
hypotenuse=sqrt(x1.^2+y1.^2)
When I use this code it only gives me distances using element by element operation. How might one prevent this from occurring and consider all combinations of adjacent and opposite side lengths?