Check this solution here if it helps you This is a code and a model for using fsolve function with MATLAB and Simulink. The both method are equivalent and give the same results. There are three types: 1- Basic : fsolve example (MATLAB & Simulink). 2- fsolve example (MATLAB & Simulink)- Inherent variables. 3- fsolve example (MATLAB & Simulink)- Inherent variables - Vector Input.