Integration with velocity trapezoidal and quadratic
1 view (last 30 days)
Show older comments
The velocity of an object is V=t*sin(ct). C is a constant. Use trapezoidal and quadratic integration to integrate this from t=0 to t=10. For trapezoidal, us spacing of 0.1. For c=0.1, c=10*pi, and c=200.
if true
% code
x = t;
t = 0:0.1:10;
y = t.*sin(c.*t);
for c = 0.1;
A = trapz(x,y)
A2= quad(fun(y),0,10)
end
end
my code just gives out on me after the first run and if I try to put another value for C besides the one listed it gives the one answer.
0 Comments
Answers (0)
See Also
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!