[Tex/LaTex] Undefined Control Sequence in Overleaft Template for IEEE Transactions

algorithmicalgorithmsoverleaf

I'm writing an article for IEEE transactions using overleaf. I'm using algorithm and algorithmic to create a algorithm in my template, but the UNDEFINED CONTROL SEQUENCE error appears. Below the code:

\documentclass[conference]{IEEEtran}
    \usepackage[cmex10]{amsmath}
        \usepackage{mathabx}
        \usepackage{algorithm}
        \usepackage{algorithmic}
        \usepackage{array}
        \usepackage{mdwmath}
        \usepackage{mdwtab}
        \usepackage{eqparbox}
        \usepackage{url}
    \begin{document}

    \begin{algorithm}
    \caption{Basic Algorithm}\label{basic}
    \begin{algorithmic}  
        \for{i = 1 : nBytes}
                \State $dataEBC = aes_encrypt_function(data(i),key)$
                \State $modSignal = step (hMod, dataEBC)$
                \State $noisySignal = step(hAWGN, modSignal)$
                \State $receivedData = step(hDemod, noisySignal)$
                \State $statedec(i) = aes_decrypt_function(receivedData, key)$
            \EndFor
    \end{algorithmic}
    \end{algorithm}
    \end{document}

Someone knows how to fix it?

Best Answer

Compile with pdflatex and run it. Many thanks to @Ilbant and @DavidCarslie for your precious helps.

enter image description here

\documentclass[conference]{IEEEtran}
    \usepackage[cmex10]{amsmath}
        \usepackage{mathabx}
        \usepackage{algorithm}
        \usepackage{algorithmic}
        \usepackage{array}
        \usepackage{mdwmath}
        \usepackage{mdwtab}
        \usepackage{eqparbox}
        \usepackage{url}
        \usepackage[utf8]{inputenc}
    \begin{document}

    \begin{algorithm}
    \begin{algorithmic}[1] 
    \caption{Basic Algorithm}\label{basic}
            \FOR{i = 1 : nBytes}
                \STATE $dataEBC = aes_encrypt_function(data(i),key)$
                \STATE $modSignal = step (hMod, dataEBC)$
                \STATE $noisySignal = step(hAWGN, modSignal)$
                \STATE $receivedData = step(hDemod, noisySignal)$
                \STATE $statedec(i) = aes_decrypt_function(receivedData, key)$
            \ENDFOR
    \end{algorithmic}
    \end{algorithm}
    \end{document}