MATLAB: How to do this one..?

ascendingdescrndingMATLABsorting

Suppose I have three numbers 6 3 and 9I want to assignx1=lowest numberx3=highest numberx2= remaining number How to do this??