Take a look at this loop from your code:
y = (1/N)*(a+((j-1)*h));
And compare it to the summation (3) in the instructions. Two problems: You are not calling your function, and you are not summing anything up. You should be summing up f(xj) values (N of them) and then dividing that sum by N according to the (3) formula. So the loop should be something like this instead:
y = y + my_fun(a+(j-1)*h);
y = y/N;
You don't need (or want) that x-linspace(etc) call.