Using a while loop on a Taylor Series?

1 vue (au cours des 30 derniers jours)
Nick Haufler
Nick Haufler le 8 Oct 2015
Commenté : Nick Haufler le 8 Oct 2015
My script wont output anything for the difference. The file attached shows the taylor series equation which I put into the variable 'Estimate'.

Réponses (1)

TastyPastry
TastyPastry le 8 Oct 2015
You need to update your variable "count". Your function repeatedly calculates the value when count = 1, so naturally on the second time through the two estimates are equal.
  1 commentaire
Nick Haufler
Nick Haufler le 8 Oct 2015
Do I update the variable 'count' inside the while loop with count+1

Connectez-vous pour commenter.

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by