Nonscalar arrays of function handles are not allowed; use cell arrays instead.
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!