How to convert my code block to recursive function?

1 vue (au cours des 30 derniers jours)
Rooter Boy
Rooter Boy le 24 Oct 2020
Commenté : Stephen23 le 24 Oct 2020
"My code block does recursion. It's not a "recursive function", as in a function that calls itself, but it does implement a recursion. " I how to convert my code block to recursive function. Can you help me, please?

Réponses (1)

Image Analyst
Image Analyst le 24 Oct 2020
You need the first line to be
function newton() % Maybe with some arguments
then somewhere in newton, you need to call newton -- that's what makes it recursive. All you have now is a simple script m-file.

Catégories

En savoir plus sur Electrical Block Libraries 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!

Translated by