Effacer les filtres
Effacer les filtres

Using a while loop to output a cube root?

2 vues (au cours des 30 derniers jours)
Nick Haufler
Nick Haufler le 8 Oct 2015
In the attached document, I cant seem to get the actual cube root value to come out. Could someone please look at my script file.

Réponses (1)

TastyPastry
TastyPastry le 8 Oct 2015
You're not updating the estimate. Your function's loop repeatedly uses the user inputted value for intialEstimate rather than updating it as the calculation progresses. You need to fix line 6 so that the estimate is updated for each loop iteration.

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