You cannot use 'fsolve' with the Rapid Accelerator Mode since it requires all the code to be compatible with Simulink Coder and hence as you stated above, no MATLAB function block will be supported. However, here are two alternative solutions that you could implement:
- Precompute the results of fsolve by running Simulink in Normal mode and pass the solution as a parameter/input to your Simulink Model.
- Create a custom S-function using C/C++ code for a root finding algorithm. This will enable you to run root finding algorithms in Rapid Accelerator Mode.
For more information regarding custom S-functions, refer to the following documentation: https://www.mathworks.com/help/simulink/slref/custom-code-and-hand-coded-blocks-using-the-s-function-api.html