E.g.,
for k=1:numel(h_max)
% use h_max(k), a_max(k), and SM(k) in your code here
end
Or if they need to vary independently you could write nested loops. E.g.,
for k=1:numel(h_max)
for m=1:numel(a_max)
for n=1:numel(SM)
% use h_max(k), a_max(m), and SM(n) in your code here
end
end
end
Depending on what your code is, you might not need to use loops at all if there are only vectorized functions involved.