  Linear codes with few weights have many applications in secret sharing
schemes, authentication codes, communication and strongly regular graphs. In
this paper, we consider linear codes with three weights in arbitrary
characteristic. To do this, we generalize the recent contribution of Mesnager
given in [Cryptography and Communications 9(1), 71-84, 2017]. We first present
a new class of binary linear codes with three weights from plateaued Boolean
functions and their weight distributions. We next introduce the notion of
(weakly) regular plateaued functions in odd characteristic $p$ and give
concrete examples of these functions. Moreover, we construct a new class of
three-weight linear $p$-ary codes from weakly regular plateaued functions and
determine their weight distributions. We finally analyse the constructed linear
codes for secret sharing schemes.
