How to vectorized the following for loop code?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Semantic Segmentation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!