# Complex Data type not accepted in Simulink

I am having an issue with the interaction of the Matlab function block in the Simulink with my model block. Below you can also find the picture. I have created a Matlab function with three inputs and 1 output. Since in the MatLab function block, I have solved a differential equation, it has complex expressions in the form of for example.

(exp(sqrt(-a/b)))

This generates the output of complex data types from the function block. When passing this to the integrator which is the input to my plant, I can not run the Simulink due to the error

    "Cannot pass the complex value to non-complex location"


I tried changing the data types of the integrator, then the same thing happens to other blocks in the Simulink. I also tried using absolute values, which of course gives real numbers, but turns out to be a very large number and generates high magnitude. I really need help in solving this issue. Can anyone help me in this/

• The logic behind the question is to clarify if the model expects an s-plane type of variable to be passed around, or if it expects a single or vector of time domain values. Is it possible to talk a little bit more about what is in the plant or function block? Complex numbers are used to express phase differences. If you are passing around only 1 "thing" (time domain), then you are going to have to find a way of combining the two "things" ($\Re(z), \Im(z)$ for some $z$ variable) into one. – A_A Jun 1 '20 at 11:15