I have found the homogeneous transformation matrix that can be used to determine the relation between the parent and child links of a robot. This matrix is shown below.
$T_i = \left[\begin{array}{ c c c c } \cos \theta_{i} & -\sin \theta_{i} & 0 & a_{i-1} \\ \sin \theta_{i} \cos \alpha_{i-1} & \cos \theta_{i} \cos \alpha_{i-1} & -\sin \alpha_{i-1} & -\sin \alpha_{i-1} d_{i} \\ \sin \theta_{i} \sin \alpha_{i-1} & \cos \theta_{i} \sin \alpha_{i-1} & \cos \alpha_{i-1} & \cos \alpha_{i-1} d_{i} \\ 0 & 0 & 0 & 1 \end{array}\right]$
I have used this matrix together with the Denavit Hartenberg parameters to make a Matlab Rigidbody Tree model. All the joints of the robot are behaving correctly. Does this mean that these matrices solve the forward kinematics? And what steps would I have to take to get the inverse kinematics in a Simulink block for example?