Bisection method tries to find solution in a given interval. Generally, you don't know how many roots a non-linear equation has and where the roots are. So it might be an guess and check problem. For your problem, you can plot the curve and estimate where the roots are roughly located.
clc;
xlabel('x')
ylabel('f(x)')
title('Roots of f(x)= -x^4+12x^2-3x-5')
fx= @(x) -x.^4+12*x.^2-3*x-5;
tol= 10^-10;
% intervals of all roots
aa = [-4 -2 0 2];
bb = [-2 0 2 4];
xx= -4:.1:4;
plot(xx,fx(xx),'b-');
xlabel('x')
ylabel('f(x)')
title('Roots of f(x)= -x^4+12x^2-3x-5')
grid on;
hold on;
for i_interval = 1:length(aa)
a=aa(i_interval);
b=bb(i_interval);
while 1
c=(a+b)/2;
if abs(fx(c)) <= tol
fprintf('foud the root at x= %f\n', c);
break;
end
if fx(a)*fx(c)<0
b=c;
else
a=c;
end
end
plot(c,fx(c),'r*', 'Markersize', 10);
end