Quote
Then when that variable gets to 10 the function steps up.
i'm not clear what your function's requirements are exactly. from what you described, sounds like you want 0 if input < 10, 1 otherwise?
Code
function y = step(x)
if x >= 10
y = 1;
else
y = 0;
end
end
then you can just loop through from -15 to 30.