This answer has been updated to be consistent with the modified question. My earlier response remains further below to the question
originally posted.
Transfer functions can be described using either positive powers or negative powers for the polynomials. Either can be used at the convenience of the user. It is more common for continuous time systems using $s$ for the variable in the Laplace Transform to be described with positive powers of $s$, while negative powers of $z$ are quite common for discrete-time systems using $z$ for the variable in the Z Transform. A big reason for this is the z transform of the unit sample delay is $z^{-1}$, so using negative power descriptions leads more readily to implementation block diagrams.
That said the OP is using the Matlab tf2zp
function, and the help for this function states clearly that the polynomials are entered in positive powers in decreasing order (regardless if we use $s$ or $z$). So the OP's numerator polynomial given as [2,3, 4] would describe the polynomial as:
$$2z^2 + 3z + 4$$
The OP has then modified this polynomial by simply adding a zero to the end of it. This results in the following polynomial:
$$2z^3 + 3z^2 + 4z + 0$$.
The result is multiplying the original polynomial by $z$, which is identical to adding a zero at the origin, since $z=0$ is now a root of the numerator. This is consistent with the results provided in the graphic at the bottom of the question posted.
That said, the comment for the following is not correct:
%using negative power representation
num1=[2 3 4]
den1=[1 3 3 1]
[z1,p1,k1]=tf2zp(num1,den1)
The above uses positive power representation given it is using the 'tf2zp' function. This representation is describing the following polynomial if we assume the variable is $z$:
$$H_1(z) = \frac{2z^2+ 3z+4}{z^3+3z^2+3z+1}$$
The next lines are correct, it is positive power representation but for a different polynomial:
%using positive power representation
num2=[2 3 4 0]
den2=[1 3 3 1]
[z2,p2,k2]=tf2zp(num2,den2)
This representation is describing the following polynomial in comparison:
$$H_2(z) = zH_1(z) = \frac{2z^3+ 3z^2+4z}{z^3+3z^2+3z+1}$$
As described earlier we simply multiplied the original transfer function by $z$.
I don't know which transfer function the OP really wants, but let's assume the OP's intention is to describe the first polynomial with negative powers of $z$, namely the polynomial with numerator given as [2,3,4] and denominator given as [1,3,3,1] corresponds to the following transfer function:
$$H_3(z) = \frac{2+ 3z^{-1}+4z^{-2}}{1+3z^{-1}+3z^{-2}+z^{-3}}$$
Then we have the following two options:
Option 1: Use Matlab's alternate function tfzpk
where the help states the polynomials are entered directly with negative powers, so:
tfzpk([2 3 4], [1 3 3 1])
Option 2: (When we don't have the luxury of a companion function that can take negative powers directly, namely we want a $H_3(z)$ that can be used with a function such as tfzp
that only allows a positive power format. The details of this are given in my original answer below with the following result):
Convert $H_3(z)$ to be the same transfer function, described with positive powers of $z$ in the format required by the function:
$$H_3(z) = \frac{z^3}{z^3}\frac{2+ 3z^{-1}+4z^{-2}}{1+3z^{-1}+3z^{-2}+z^{-3}} = \frac{2z^3+3z^2+4z}{z^3+3z^2+3z+1}$$
This results in the following MATLAB command:
tf2zp([2 3 4 0], [1 3 3 1]
Both Option 1 and Option 2 should provide the identical result.
Answer to question as originally posted
The OP's intended transfer function written with negative power representation is given as:
$$H(z) = \frac{2+3 z^{-1}+ 4 z^{-2}}{1+3 z^{-1}+ 3 z^{-2} + z^{-3}}$$
The function the OP is using requires positive power representation.
If we wanted instead $H(z)$ to be expressed with all positive powers of $z$, in lowest order, we can multiply numerator and denominator by $z^3$ resulting in:
$$ H(z) = \bigg(\frac{z^3}{z^3}\bigg)\frac{2+3 z^{-1}+ 4 z^{-2}}{1+3 z^{-1}+ 3 z^{-2} + z^{-3}}$$
If we multiply this out we get:
$$ H(z) = \frac{2z^3+3z^2+4z + 0}{z^3 +3z^2+3 z+ 1}$$
The OP has added a extra zero on both numerator and denominator polynomials instead of the numerator only as demonstrated above. What the OP has done does not achieve the result detailed above and changes the poles represented, as the OP has found, since the denominator order has increased. However a simple solution in this particular case is to just use the alternate MATLAB function 'tf2zpk' that uses negative powers of z directly: The MATLAB function used 'tf2zp' states in its help that it uses a positive power representation and recommends using another function 'tf2zpk' when a negative power representation is desired. MATLAB, Octave and Python functions used for signal processing and discrete time processing in the z-domain typically use polynomials expressed with negative powers. While MATLAB, Octave and Python functions used for control systems and continuous time processing typically used polynomials expressed with positive powers. This isn't a hard and fast rule, so best to refer to the help documentation for any function used to determine which convention is used.