Resulting vector and angle from two vectors
Afficher commentaires plus anciens
Hi,
I have two vectors U and V with wind velocities. V is positive from south to north, and U is positive from west to east. I am wondering if there is a good way in matlab to combine these two vectors in order to get the resulting vector and angle in a 360 degree order where 0 is due north?
Réponses (1)
Star Strider
le 7 Mai 2017
You’ve not provided enough information to write a specific Answer.
I have no idea what your data are, so this is purely a guess:
u = sind(135+90);
v = cosd(135-90);
anglq = atan2d(u,v); % Angle Corrected For Quadrant
Angles360 = @(a) rem(360+a, 360); % For ‘atan2d’
angl360 = Angles360(anglq);
I’ll delete my Answer if I guessed wrong and this is wildly off-the-mark.
Catégories
En savoir plus sur Lengths and Angles dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!