Hi Takumi,
The "residue" function in MATLAB is used to perform partial fraction expansion of a given rational transfer function. It returns the residues, poles, and direct term of the expansion.
In the provided code snippet, the "residue" function is used to calculate the residues and poles of the transfer function defined by the coefficient arrays B and A. The residues are stored in the variable r, the poles are stored in the variable p, and the direct term is stored in the variable k.
the decimal value are rounded off to the nearest values in every case that a MATLAB variable encounters a long decimals value, you can read about the format function to customize the view as per your requirement type "help format" in you command window of MATLAB or refer: https://www.mathworks.com/help/matlab/ref/format.html and https://www.mathworks.com/help/matlab/ref/format.html