Variable input argument invalid (function)

30 views (last 30 days)
FarisM
FarisM on 10 Feb 2015
if true
function [ theta, E, D,FL] = OP1(AngleMax,necktodiameter,alpha,beta)
global a b
a = 52; %fixed at a rate of 52 degree
b = 15; %fixed at a rate of 15 degree
theta = (AngleMax)-(2*asind(1./(necktodiameter)));
E = cosd(theta/2) - sind(alpha).*cosd(beta).*cosd(a).*cosd(b);
D = ((1-((sind(alpha)).^2*(cosd(beta).^2).^2))*(1-(cosd(a)).^2*(cosd(b).^2))) - E.^2;
FL = acosd((((((-sind(beta)).*(cosd(a)).*(sind(b))) + ((cosd(alpha)).*(cosd(beta)).*(sind(a)))).*E)...
- ((((cosd(alpha)).*(cosd(beta)).*(cosd(a)).*(sind(b)))+((sind(beta)).*(sind(a)))).*sqrt(D)))....
/((1-sind(alpha).^2.*cosd(beta).^2).*(1-cosd(a).^2.*cosd(b).^2)));
end
Dear all,
When I try to put the function in command with many variables of beta, the value of FL is only one.
For example:
>> [ theta, E, D, FL] = OP1(180,2,35,[10,15,20])
Others value come with 3 values, but FL only one value
Help me

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!