MATLAB: Error receiving an array as an output of one of the variables.

arraysfunctionMATLAB

The function I wrote is:
function [A, c, B] = solveSAS(a, C, b)
c = sqrt(a.^2 + b.^2 - 2*a.*b.*cosd(C));
B = asind((b.*sind(C))/c);
A = 180 - (B+C);
end
If I input [5 9.1 10.2] for a, [90 50 115] for C, and [6 9.1 8.1] for b I get an array for the outputs of c and A but not B.
Thank you in advance.

Best Answer

a = [5 9.1 10.2];
C = [90 50 115];
b = [6 9.1 8.1];
[A, c, B] = solveSAS(a, C, b)
function [A, c, B] = solveSAS(a, C, b)
c = sqrt(a.^2 + b.^2 - 2*a.*b.*cosd(C));
B = asind((b.*sind(C))/c);
A = 180 - (B+C);
end
Result
A =
53.468225640646608 93.468225640646608 28.468225640646608
c =
7.810249675906654 7.691652363680729 15.475252552705987
B =
36.531774359353399