I cannot get my function to work which is to find the minimum angle between 2 inputs a and b
조회 수: 1 (최근 30일)
이전 댓글 표시
function [y] = CalcMinAngle(a,b)
check = isa(a,'unit8');
check = isa(a,'unit16');
check = isa(b,'unit8');
check = isa(b,'unit16');
if (check == 1)
warning('input is not in a unit8 or unit16 format')
end
T1 = isinf(a);
T2 = isinf(b);
if 0 < T1 || T2 > 0
y = -1;
else
alpha = deg2rad(a);
beta = deg2rad(b);
delta = angdiff(alpha,beta);
min = rad2deg(delta);
end
end
Im trying to test this so i also have a test script, but for some reason i keep getting the error that i require more input arguments? please help this is really stressing me out now
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!