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

조회 수: 209 (최근 30일)
호준 이
호준 이 2021년 5월 17일
답변: Shiva Kalyan Diwakaruni 2021년 5월 25일
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
Shiva Kalyan Diwakaruni 2021년 5월 25일
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에서 프로그래밍에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!