Simulation of Hebbian Learning Algorithm (.m file) in MATLAB