Using a while loop to output a cube root?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
TastyPastry
il 8 Ott 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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!