Hi,(adsbygoogle = window.adsbygoogle || []).push({});

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 occuring and consider all combinations of adjacent and opposite side lengths?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Computing question 1st year Engineering-MATLAB

Tags:

**Physics Forums | Science Articles, Homework Help, Discussion**