I think a recursive call is still kind of a loop, but it could be done like this:
function recursivePrint(i, maxNumber)
if( i <= maxNumber )
disp(i)
recursivePrint(i+1, maxNumber)
end
endfunction
recursivePrint(1, 10);
Usually when people ask to write a function without a loop they mean something like:
disp(1:10)