Function in Matlab that calculates the nth derivative
Mostrar comentarios más antiguos
I want the code for a function that calculate the nth derivative without using built in function like "diff".
9 comentarios
Daniel Pollard
el 5 de En. de 2021
What have you tried so far?
lilo moutila
el 5 de En. de 2021
John D'Errico
el 5 de En. de 2021
All of my functions are constants, so the nth derivative, (for n >= 1) is zero.
nthderiv = 0;
lilo moutila
el 5 de En. de 2021
Daniel Pollard
el 5 de En. de 2021
If you're a complete beginner I'd suggest checking out the Matlab Onramp course, which covers all the basics you need to get started. If you've done that and are happy with basic functions, arrays and the syntax, then the next step would be to have a look at the wikipedia page for numerical differentiation. The first section on finite differences is likely what you need.
After that, have a go at writing a function which estimates a derivative. If you have a specific question about Matlab or its applications then post that, but posting a relatively advanced homework question without even trying doesn't look great.
lilo moutila
el 5 de En. de 2021
John D'Errico
el 5 de En. de 2021
There was no point to my comment, but your question has no meaningful answer. If you cannot use a tool like diff, then this is homework. Homework is there for you to solve, not for us to do for you.
Respuestas (0)
Categorías
Más información sobre Startup and Shutdown 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!