s-domain to z-domain conversion in MATLAB
You need to specify the method of conversion.
If you select Bilinear transform as the method, the conversion can be done by substitution.
The substitution required
(from Wikipedia) is
$$
s \mapsto \frac{2}{T} \frac{z-1}{z+1}
$$
e.g. If the transfer function is, \$\frac{k}{s+a}\$, it becomes
$$
\frac{k}{
\frac{2}{T} \frac{z-1}{z+1} + a
}
=
\frac{T\ k\ (z+1)}{(2+a\ T)z + (a\ T -2)}
$$
If you are using symbolic computation, and if the transfer function is available as a symbolic expression, then the subs function in symbolic tool box of Matlab can be used.
% s and z are symbolic variables
% expression_for_tf is a an expression containing (powers) of s
subs(expression_for_tf, s, 2*(z-1)/(T*(z+1)));

Note that there are other methods for converting a continuous time transfer function to discrete time transfer function. Method selection depends on the application. Other methods may not allow for such a conversion by plain substitution.