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 Kommentar

Jintao Wu
Jintao Wu am 2 Mär. 2020
I can't undrstand the means of ' how could I calculate the intergrral of a function '

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Bjorn Gustavsson
Bjorn Gustavsson am 2 Mär. 2020

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by