Does anyone here know how I make a random number generator in matlab

to choose a natural number from (1,..., n)?

(edit: I found something wich kind of does what I want...N=rand(k,1) makes a vector of k random numbers in (0,1). Then N=round(n*rand(k,1)) creates a vector of k numbers in {1,...,n}. However this could be done better right?)