4. If a number, from the highest digit to the lowest digit, does not decrease at each digit, it is called a "positive number" (such as $12$, $22$, $566$, $1448$, $123456789$, etc.); if a number, from the highest digit to the lowest digit, does not increase at each digit, it is called a "negative number" (such as $21$, $22$, $665$, $8441$, etc.). A number that is neither a positive number nor a negative number is called a "swinging number" (such as $253$, $3473$, $5887$, etc.). Then among the three-digit numbers, there are $\qquad$ swinging numbers.
4.525.

According to the definition of a wavy number, we discuss in two cases:
(1) The hundreds, tens, and units digits are in the pattern "small-large-small": there are
$$
2 \times 1+3 \times 2+\cdots+9 \times 8=240 \text { (numbers). }
$$
(2) The hundreds, tens, and units digits are in the pattern "large-small-large": there are
$$
1^{2}+2^{2}+\cdots+9^{2}=285 \text { (numbers). }
$$

In summary, there are $240+285=525$ wavy numbers.