How to vectorized the following for loop code?
Afficher commentaires plus anciens
for n=1:nt-1
sum1=0;
for jj=1:m-1
sum1=sum1+(t(n+1)).^jj.*u(1).^jj/factorial(jj);
end
sum2=0;
for ii=1:n
sum2=sum2+(h.^alpha).*(1/gamma(alpha+1)).*((n-ii+1).^alpha-(n-ii).^alpha).*(f(t(ii),u(ii)));
end
u(n+1)=sum1+sum2;
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Semantic Segmentation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!