MATLAB: How to get absolute value

absolute value

I have some error data with time. and i want to get minimum absolute value from one time point till end time point.
for example
time 0 1 2 3 4 5 6
data 0.3 0.4 0.5 0.6 0.8 0.9 1.0
in the above example i want to get minimum absolute value from time = 3 to time = 6
so should i get this ?
right now i am doing like this
y = min(abs(e(3,end)))
e is variable where i am saving this time and data

Best Answer

time = [0 1 2 3 4 5 6]:
data = [0.3 0.4 0.5 0.6 0.8 0.9 1.0];
ini = find(time == 3);
fin = find(time == 6);
result = min(abs(data(ini:fin)));