Equation for a smooth staircase function I am looking for a smooth staircase equation $f(h,w,x)$ that is a function of the step height $h$, step width $w$ in the range $x$. 
I cannot use the unit step or other similar functions since they are just one step. I have been experimenting with various sigmoid curves and while I can get a single smooth step I cannot get to realize the staircase shape. The closest staircase function I have found is given in this paper in equation (18) and depicted in Fig. 4 and it is a close example of what I want (i.e generate a staircase in the range $x$ for arbitrary step heights and widths) but it is not smooth at all.
Regarding smooth steps, a likely starting point I found is here but it gives a smooth function of just a single step. I have been unable to modify the equation to make it into a staircase. I would like to specify arbitrary step heights and widths and generate a smooth staircase in the range $x$ specified.  
Edit (Extra info):
The smooth function I mention above has the problem that the upper, horizontal line is not equal in length to the lower, horizontal line which is why I have been unable to adapt it into a staircase function 
Edit 2
Including some pictures 


Edit 2
Plot of $s$ with a steep slope showing a different width on the first horizontal line


I used the following function, where the width of the flat part of each step is b and the width of the curved part is c, and each step is 1 unit tall:
$$ f(x) = \lfloor \frac{x}{b+c} \rfloor + 
\begin{cases}
  0, & \text{if } x-(b+c) \lfloor \frac{x}{b+c} \rfloor, \\
  s(\frac{x - (b+c) \lfloor \frac{x}{b+c} \rfloor - b}{c})
, & \text{otherwise}.
\end{cases}
$$
I used $\cos$ for my stepping function:
$$s(u) = \frac{1}{2} - \frac{1}{2} \cos (\large{\pi} \small{u})$$
It might look a bit simpler in Javascript code, using some temporary variables and modulus (%):
function stair (x, b, c) {
    const width = b + c;
    const base = Math.floor(x / width);    // base of this step
    const o = x % width;                   // offset, between 0 and width

    return base + (o < b ? 0 : step((o - b) / c));
}

function step (u) {
    return 0.5 - 0.5 * Math.cos(Math.PI * u);
}

although Javascript's % restricts us: x must be non-negative,
 and b and c must be integers .
Those restrictions can be lifted if we change how o is calculated:
    const o = x - width * base;

In Gnuplot you can experiment using:
gnuplot> f=4; c=1; plot [x=0:20] floor(x/(f+c)) + ((floor(x)%(f+c))<f ? 0 : 0.5-0.5*cos(((x - (f+c)*floor(x/(f+c))) - f) * pi/c))


