difficulty in solving integration of a function

how could I calculate the integeral of a function
F = log(1 + p/[(x(t))^2 + (y(t))^2)]) where t varies from 0 to 7
here
x(t) = 100-(50*cos(theta)*t)
y(t) = H+50*sin(theta)*t-4.9*t^2
theta could be any between 0 to 75 degree

1 个评论

I can't undrstand the means of ' how could I calculate the intergrral of a function '

请先登录,再进行评论。

 采纳的回答

Implement the functions x(t,theta), y(t,theta,H) and F(t,H,p,theta) step-by step. Something like this:
y = @(t,theta,H) H+50*sin(theta)*t-4.9*t.^2; % Note the change to elementwise operation in the last term
...etc
Then Check that your function F is wellbehaved in the intervall of interest:
t = linspace(0,7,701);
plot(t,F(t,1,2,pi/5))
If that looks reasonably OK integrate:
H = 12;
p = 0.012;
theta = pi/7;
Q = integral(@(t) F(t,H,p,theta),0,1);
HTH

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by