16 lines
322 B
Matlab
Executable File
16 lines
322 B
Matlab
Executable File
function angle = arotHR(mx,my,j) %Unit vectors
|
|
|
|
i = 1;
|
|
% j è la data
|
|
if my(i,j)>0
|
|
angle = 90-(atan(mx(i,j)/my(i,j)))*180/pi;
|
|
elseif my(i,j)<0
|
|
angle = 270-(atan(mx(i,j)/my(i,j)))*180/pi;
|
|
elseif (my(i,j)==0)&&(mx(i,j)<0)
|
|
angle = 180.0;
|
|
elseif (my(i,j)==0)&&(mx(i,j)>0)
|
|
angle = 0.0;
|
|
end
|
|
|
|
end
|