First input argument must be a function handle.
Mostrar comentarios más antiguos
clc;
clear all;
close all;
X0 = linspace(0.1,0.99,50);
for i = 1:length(X0)
Ts = 1;
T(i) = Ts*acos((Ts-X0(i))/Ts);
v(i) = sqrt(1-((Ts-X0(i))/Ts).^2);
dE(i) = @(t) 0.5*(-((X0(i)-Ts)./Ts).*sin(t./Ts)+v(i).*cos(t./Ts)+Ts).^2;
E(i) = integral(dE(i),0,T(i))
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Numerical Integration and Differentiation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!