'입력인수가 부족합니다'를 어떻게 해결하죠?

17 次查看(过去 30 天)
호준 이
호준 이 2021-5-17
function time = T(x)
time = 3125./((1/2*1.225*(290*1000/3600)^2*22*0.065621+3125*cos(15/180*pi))-(1/2*1.225*x.^2*22*0.065621+3125*cos(15/180*pi)));
end
함수를 이렇게 지정하고
int(T,[0 50])
실행창에 명령을 이렇게 내렸는데
>> int(T,[0 50])
입력 인수가 부족합니다.
오류 발생: T (line 2)
time = 3125./((1/2*1.225*(290*1000/3600)^2*22*0.065621+3125*cos(15/180*pi))-(1/2*1.225*x.^2*22*0.065621+3125*cos(15/180*pi)));
이렇게 나옵니다
어떻게 해야 오류가 풀릴까요

回答(1 个)

Shiva Kalyan Diwakaruni
Hi,
You can declare a symbolic variable like below
x = sym('x')
and call your function by passing above declared symbolic variable to your function like below
int(T(x),[0,50])
Hope it helps

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!