Um, look closely at the code that you wrote. Hey, it is your code. You should know what is in it.
First, what does your function return?
function root = mybisect29th(a,b)
It returns the variable root.
Where do you compute root?
root = roots([-1 -29]);
And then root is never used afterwards. As it is, I'm not at all sure what you think that line in your computation does. But it does not use bisection. And worse, it does not even compute the correct value. Root will be the solution of the equation
-x - 29 == 0,
So root will be -29.
The funny thing is, your code might actually work, IF you returned the variable m as a result, not that strange thing in root.
(Actually, I predict your code will fail, because the test inside the wile loop:
if sign(f(a)) == sign(f(b))
is the wrong thing to test. You actually wanted to compare f(a) to f((a+b)/2) at that point.
But at least your bisection code was getting close to working.

