I have a modeling design for Humanoid robot arm in simscape-SimMechanics in Matlab, I am trying to use the inverse kinematic to make a reaching movement for the arm to the target position; however, I want to know if there is a possibility to coding the forward and inverse kinematic using a block function in Simulink becuase all most of the users try to exploit the Robotic Toolbox to get the Forward and Inverse Kinematics and implement to the robot. ( I mean i want to control my own design in SimMechanics rather than using Robotic Toolbox)
You could use the MATLAB function block. Write a script that contains a single function for doing forward/inverse kinematics, then reference it in the MATLAB function block. Similarly, you could use the S-function block. This would let you make a more complex set of functions contained in a block. Within either of these functions that you write you can use your favorite numerical method to solve the inverse kinematics.