It was proved by Shen that the graph of the classical Weierstrass function ∑;=;λ;cos(2πb;x) has Hausdorff dimension 2 + log λ/log b, for every integer b ≥ 2 and every λ∈(1/b, 1) [Hausdorff dimension of the graph of the classical Weierstrass functions, Math. Z., 289(2018), 223–266]. In this paper, we prove that the dimension formula holds for every integer b ≥ 3 and every λ∈(1/b, 1) if we replace the function cos by sin in the definition of Weierstrass function. A class of more general functions are also discussed.