Using a while loop to output a cube root?
이전 댓글 표시
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.
답변 (1개)
TastyPastry
2015년 10월 8일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!