Taking the derivative of a long function
Afficher commentaires plus anciens
I have written out a function and I need to take the derivative of that function. However, when I try to use diff() I am getting an error. The method I am trying to use is below.
func = @(x) (1/sqrt(x))+2.0*log10(((n/d)/3.7)+(2.51/(re*sqrt(x))));
dfunc = diff(func);
It is worth noting that the only variable is x. All the other variables have been inputted by the user.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox 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!