Integration with velocity trapezoidal and quadratic

1 visualización (últimos 30 días)
Raye
Raye el 14 de Mzo. de 2013
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.

Respuestas (0)

Categorías

Más información sobre Quadratic Programming and Cone Programming 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!

Translated by