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

3 vues (au cours des 30 derniers jours)
mohamed elkasemy
mohamed elkasemy le 14 Avr 2019
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

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by