function [x, out] = myfunc(x) j = 1; for i=1:x j = j + 1; end out = j; end