Hello,
I managed to fix the problem by calling another function inside the function "IK" to calculate the numerical values of the matrices using "double" then the whole function is called inside the Simulink matlab function block through "coder.extrinsic"
I hope this would help anyone. If you have any other suggestions please let me know :)
