We investigate a discrete Ablowitz–Ladik equation with variable coefficients, which models the modulated waves in an electrical lattice. Employing the similarity transformation and Kadomtsev–Petviashvili hierarchy reduction, we obtain the rogue-wave solutions in the Gram determinant form under certain variable-coefficient constraints. We graphically study the rogue waves with the influence of the coefficient of tunnel coupling between the sites, |Λ(t)|\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$|\varLambda (t)|$$\end{document}, time-modulated effective gain/loss term, γ(t)\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$\gamma (t)$$\end{document}, space–time-modulated inhomogeneous frequency shift, vn(t)\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$v_n(t)$$\end{document} (n=1,2,…\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$n=1,2,\ldots $$\end{document}), and lattice spacing, h, where t is the scaled time. Increasing value of h leads to the decrease in the rogue waves’ amplitudes. Properties of the rogue waves with |Λ(t)|\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$|\varLambda (t)|$$\end{document} as the polynomial, sinusoidal, hyperbolic and exponential functions are discussed, respectively. The monotonically increasing, monotonically decreasing, periodic and Gaussian backgrounds are, respectively, displayed with the different γ(t)\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$$\gamma (t)$$\end{document}. The first-order rogue wave exhibits one hump and two valleys, and the second-order rogue waves exhibit three humps and one highest peak. The third-order rogue waves with the six humps and one highest peak are also presented.