Functional electrical stimulation (FES) is a medical device that delivers electrical pulses to the muscle, allowing patients with spinal cord injuries to perform activities such as walking, cycling, and grasping. It is critical for the FES to generate stimuli with the appropriate controller so that the desired movements can be precisely tracked. By considering the repetitive nature of the movements, the learning-based control algorithms are utilized for regulating the FES. Iterative learning control (ILC) and repetitive control (RC) are two learning algorithms that can be used to accomplish accurate repetitive motions. This study investigates a variety of ILC and RC designs with distinct learning functions; this constitutes our contribution to the field. The FES model of ankle angle, which is in a class of discrete-time linear systems is considered in this study. Two learning functions, i.e., proportional, and zero-phase learning functions, are simulated for the second-order FES model running at a sampling time of 0.1 s. The results indicate the superior performance of the ILC and RC in terms of convergence rate using the zero-phase learning function. ILC and RC with a zero-phase learning function can reach a zero root-mean-square error in two iterations if the model of the plant is correct. This is faster than proportional-based ILC and RC, which takes about 40 iterations. This indicates that the zero-phase learning function requires two iterations to ensure that the patient's ankle angle precisely tracks the intended trajectory. However, the tracking performance is degraded for both control methods, especially when the model is subject to uncertainties. This specific problem can lead to future research directions.