Newton Raphson Method ,Help needed

Hi, i have been asked to create a function newton.m which takes as input f(x),f'(x) and root esitmate x0 and throws out the true root of f(x) using the newton raphson method.

after i have created my file,i have to find the root of the 75^(1/3) which is the cuberoot of 75

here is where i have reached thus far:

dont know whats going wrong.

function [root,x] = newton(a,tol)

f(a)=75^(1/3)

fp(a)=0

test = abs(f(a));

i = 0;

x(i+1) = a;

%while test > tol

for i=1:30

a = a - f(a)/fp(a);

test = abs(f(a));

i = i+1;

x(i+2) = a;

end

i

root = a;

can anyone tell me wherei m going wrong,here is what i get when i try to run the file:

>> newton(1,1e-6)

f =

4.2172

fp =

0

??? Attempted to access f(-Inf); index must be a positive integer or logical.

Error in ==> newton at 11

test = abs(f(a));