Nonscalar arrays of function handles are not allowed; use cell arrays instead.
2 views (last 30 days)
Show older comments
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) = @(v,t) 0.5*(-((X0(i)-Ts)./Ts).*sin(t(i)./Ts)+v(i).*sin(t(i)./Ts)+Ts).^2;
E(i) = integral2(dE,0,t(i),0,v(i))
end
0 Comments
Answers (0)
See Also
Categories
Find more on Logical 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!