I want to put matlab code into my latex document and I saw this post.
However, I don't really see how this works. I entered the following code into my overleaf account :
\documentclass{article}
% http://www.mathworks.com/matlabcentral/fileexchange/8015-m-code-latex-package
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}
\begin{document}
\begin{lstlisting}
function y = myfun(aa, sigma, options)
sigma
y = aa .* pdf('logn', aa, -0.5*sigma^2, sigma)
%y = 1/(sigma.*sqrt(2.*pi)) .* exp((-((log(aa)+0.5*sigma.^2)).^2) ./ (2.*sigma.^2));
\end{lstlisting}
\end{document}
But I get the errror
LaTeX Error: File `mcode.sty' not found.
What can I do to fix this?
overleafsupports that package. May be it is good to check with their CS, I think. – Raaja_is_at_topanswers.xyz Jan 31 '19 at 13:59mcode.styinto your project and everything will work. – CarLaTeX Apr 17 '19 at 08:29