# Thread: Apply Newtown's method & shifting nth root algorithm to compute nth root

1. ## Matlab-Apply Newtown's method & shifting nth root algorithm to compute nth root

1. Use Newton's method & shifting nth root algorithm to compute nth root
I don't know how to apply Newton's method & shifting nth root algorithm in matlab code.

2. Originally Posted by Nickn
1. Use Newton's method & shifting nth root algorithm to compute nth root
I don't know how to apply Newton's method & shifting nth root algorithm in matlab code.
Do you know what the algorithms are?

CB

3. Hi CB,

Bacially,the algorithm is some thing likes below,

http://en.wikipedia.org/wiki/Shiftin...root_algorithm

The final algorithm is:
1. Initialize r and y to 0
2. Repeat until desired precision is obtained:
1. Let α be the next aligned block of digits from the radicand
2. Let β be the largest β such that
3. Let y' = By + β
4. Let r' = Bnr + α − ((By + β)nBnyn)
5. Assign and
3. y is the largest integer such that yn < xBk, and yn + r = xBk, where k is the number of digits of the radicand after the decimal point that have been consumed (a negative number if the algorithm hasn't reached the decimal point yet).