# Thread: Using a for loop and while loop.

1. ## Using a for loop and while loop.

f= x^(1/3). How would i write an m.file to lend numerical support to show that the limit as x approaches 27 is 3? using the for loop and while loop respectively...

2. Originally Posted by herbalist
f= x^(1/3). How would i write an m.file to lend numerical support to show that the limit as x approaches 27 is 3? using the for loop and while loop respectively...
Something like the following for thr for loop:

Code:
for idx=1:10

eps=10^(-idx)
(27+eps)^(1/3)

end
CB