Skip to content
Snippets Groups Projects
Commit 04392fc5 authored by Peter Reischig's avatar Peter Reischig Committed by Nicola Vigano
Browse files

Obsolete function marked for deletion.

parent c429bf6e
No related branches found
No related tags found
No related merge requests found
function angdeg = gtMathsVectorsAngles(v1, v2)
% GTMATHSVECTORSANGLES Angles in degrees between 3D UNIT vectors.
% Function is out-of-date! Use one of these instead:
% angrad = gtMathsVectorsAnglesRad(v1,v2,colvec)
% angdeg = gtMathsVectorsAnglesDeg(v1,v2,colvec)
%
% FUNCTION angle = gtMathsVectorsAngles(v1,v2s)
%
% Gives the angles between a vector and a set of other vectors.
% Input vectors must be normalised.
%
% INPUT
% v1 - an arbitrary 3D unit vector (1x3)
% v2s - a set of arbitrary 3D unit vectors (nx3)
%
% OUTPUT
% angle - list of angles between v1 and v2s (nx1)
% (in degrees, between 0deg and 90deg)
%
function angle = gtMathsVectorsAngles(v1,v2s)
dotprod = abs(v2s*v1');
dotprod(dotprod>1) = 1;
disp('Function is out-of-date! Use one of these instead:')
disp(' angrad = gtMathsVectorsAnglesRad(v1,v2,colvec)')
disp(' angdeg = gtMathsVectorsAnglesDeg(v1,v2,colvec)')
angle = acosd(dotprod);
error('Function is out-of-date!')
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment