What values does your loop variable take on when you use the code as you've written it?
y = [2.903E-04, 7.538E-05, 2.525E-05, 2.136E-03, 2.051E-02];
for k = y(2):y(end)
There's no such thing as element 7.538e-5 of an array in MATLAB. You could loop from 2 to numel(y) but that would leave dBa(1) as 0. [I'm not sure whether that's intended or not based on your code.]
for k = 2:numel(y)
fprintf('y(%d) is %g.\n', k, y(k))
Or you could vectorize the computation of dBa using element-wise division (./) instead of matrix division (/). For scalar values, ./ and / behave the same. For non-scalars they don't.
k = 2:numel(y);
dBa(k) = 10*log10(y(k)./(y(k-1)))