Integration with velocity trapezoidal and quadratic
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!