In this paper, we propose a novel Zhang dynamics (ZD) for online solution of scalar-valued time-varying linear inequality. The design method of such a ZD model, which is based on an exponent design formula, can guarantee smooth convergence performance. In addition, three different activation functions are exploited in the proposed ZD models for solving scalar-valued time-varying linear inequality. For possible digital simulation and/or hardware implementation, the corresponding discrete-time ZD models are derived and proposed as well.Through illustrative examples and verifications, we demonstrate and verify the efficacy and superiority of the proposed continuoustime and discrete-time ZD models.