The idea of placing poles at the origin of the z-plane for designing a deadbeat controller is indeed correct. It's important to remember that the origin of the z-plane corresponds to the point at negative infinity along the x-axis in the s-plane.
Therefore, it's essential to calculate the discrete open-loop system formed by the continuous plant and zero-order hold first, and then perform pole placement in the discrete domain. To convert the continuous system into a discrete one the c2d function can be used.
Additionally, the acker function, which uses Ackerman's formula for pole placement, has been replaced by the place command in more recent MATLAB versions. Here's and example snippet and model:
sys_cont = ss(A_cont, B_cont, C_cont, D_cont);
sys_disc = c2d(sys_cont, Ts, 'zoh');
K = place(A_disc, B_disc, desired_poles);
disp('State feedback gain K:');
A_cl = A_disc - B_disc * K;
sys_cl = ss(A_cl, B_disc, C_cont, D_cont, Ts);
title('Step Response of the Closed-Loop System');
xlabel('Time (seconds)');
To know more about the functions used in the above snippet kindly refer the following pages: