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

161 visualizaciones (últimos 30 días)
호준 이
호준 이 el 17 de Mayo de 2021
Respondida: Shiva Kalyan Diwakaruni el 25 de Mayo de 2021
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)));
이렇게 나옵니다
어떻게 해야 오류가 풀릴까요

Respuestas (1)

Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni el 25 de Mayo de 2021
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

Categorías

Más información sobre 프로그래밍 en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!