\documentclass[a4paper]{article}

\usepackage{color}
\usepackage{listings}

\lstset{
	tabsize=4,
	rulecolor=,
	language=matlab,
    basicstyle=\scriptsize,
    aboveskip={1.5\baselineskip},
    columns=fixed,
    showstringspaces=false,
    extendedchars=true,
    breaklines=true,
    prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
    showtabs=false,
    showspaces=false,
    showstringspaces=false,
    identifierstyle=\ttfamily,
    keywordstyle=\color[rgb]{0,0,1},
    commentstyle=\color[rgb]{0.133,0.545,0.133},
    stringstyle=\color[rgb]{0.627,0.126,0.941},
    numbers=left, 
    numberstyle=\tiny,
    frame=l
}

\begin{document}
\begin{lstlisting}
function val = fibonacci(n)
	% Calculate n'th fibonacci number.
	if(n==0 || n==1)
		val = 1;
		return;
	else
		val = fibonacci(n-1) + fibonacci(n-2);
	end
end
\end{lstlisting}
\end{document}