Using a while loop to output a cube root?

3 visualizaciones (últimos 30 días)
Nick Haufler
Nick Haufler el 8 de Oct. de 2015
Respondida: TastyPastry el 8 de Oct. de 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.

Respuestas (1)

TastyPastry
TastyPastry el 8 de Oct. de 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.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by