How do integrate this function over t=0 to t=165?

2 visualizaciones (últimos 30 días)
Chukwunememma Uponi
Chukwunememma Uponi el 29 de Nov. de 2019
Respondida: Star Strider el 29 de Nov. de 2019
mi=2290000;
mf=130000;
tb=165;
t=linspace(6.5,165);
mr=mi-((mi-mf)*(t/tb))
plot(t,mr, 'blue')
hold all
g = 9.81;
Isp=263;
u=g.*(Isp.*log(mi./mr)-t)

Respuesta aceptada

Star Strider
Star Strider el 29 de Nov. de 2019
I am not certain what you want to integrate, or what you want the final result to be.
Try this:
mi=2290000;
mf=130000;
tb=165;
t = linspace(0, tb, 150);
mr = mi-((mi-mf)*(t/tb));
mr_int = cumtrapz(t, mr); % Integrate ‘mr’
figure
semilogy(t,mr, 'blue')
hold on
plot(t, mr_int, 'g')
g = 9.81;
Isp=263;
u = g.*(Isp.*log(mi./mr)-t);
u_int = cumtrapz(t, u); % Integrate ‘u’
plot(t, u)
plot(t, u_int)
hold off
legend('mr', 'mr\_int', 'u', 'u\_int', 'Location','SE')
I ploltted the vectors in semilogy so they would all be visible.
Experiment to get different results.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation 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