Nonscalar arrays of function handles are not allowed; use cell arrays instead.

조회 수: 3 (최근 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개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by