Variable input argument invalid (function)

조회 수: 28 (최근 30일)
FarisM
FarisM 2015년 2월 10일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by