What could be a faster way to calculate first derivative of a field?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Tanmay Agrawal
le 31 Mar 2023
Réponse apportée : Bruno Luong
le 31 Mar 2023
I want to calculate first derivative (using second-order FDM) of a 1D field that is quite large, about 12 million points. Instead of using:
for i = 2:(N-1)
dfdt(i) = (f(i+1)-f(i-1))/(2*dt);
end
can I do something else which takes advantage of some innate feature of MATLAB that could potentially reduce the total computational time?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
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!