This work presents a control strategy based on a reinforcement learning algorithm for a linear system and compares it with the classical discrete-continuous control method. Both approaches were applied to a discrete system. Discrete-continuous control extends classical techniques by allowing the control signal to vary within the sampling interval, which improves accuracy; however, it requires knowledge of system parameters, limiting its applicability under uncertainty. As a modern and adaptive alternative, a data-driven method using the off-policy Q-learning algorithm is considered. This approach does not require a priori model identification or precise knowledge of the system parameters, as it learns directly from measured data. The developed control algorithm demonstrates robustness. Numerical simulations were carried out on an inverted pendulum system, confirming the effectiveness of both methods. In addition, an experiment was conducted to evaluate the impact of noise on the model. A comparative analysis of the two algorithms is presented based on system stabilization time and the Euclidean norm of the control vector.