I'm not sure what are your conditions (in the if statements), but you used (y1) as a matrix index which cannot be made unless (y1) varies as 1, 2, 3.. (positive real integer, and larger than zero). But I think the following is what you're looking for:
title('Damping some signal with exponential decay function','fontWeight','bold');
And, theoretically, the value of (a) that makes (z at t=100) become zero is (infinity), since
if and only if (-at) goes to (- infinity), and since (t) is finite (t=100), so (a) must be as mentioned (I think you meant the largest value of variable a instead of the smallest). But you can assign large value to (a) that makes Matlab unable to recognize it from absolute zero, as
min(min(z(:,100))) = -4.0019e-322
at a=7.5000, Matlab finds that the minimum is exactly 0.