Complex Data type not accepted in Simulink
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Everyone, I am having an issue with the interaction of 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 an differential equation, it has complex expressions in the form of for example .
(exp(sqrt(-a/b)))
This generates the output of complex data type from the function block. When passing this to the integrator which is the input to my plant, I cannnot run the simulink due to the error
"Cannot pass the complex value to non-complex location"
I tried chaning the data types of integrator, then the same thing happens to other blocks in the simulink.
I also tried using absolute values, which ofcourse gives real number, but turns out to be very large numbr and genrates high magnitude. I really need help in solving this issue.
Can anyone help me in this/
Thanks in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/307383/image.png)
7 comentarios
Walter Roberson
el 1 de Jun. de 2020
In past post, Mathworks employees say that if you need to use an integrator with complex values, then seperate real and complex parts and integrate them seperately. You indicated that you tried that but the coefficients got large. If you have a rotary motion, then the information about wrapping values on the Integrator page might help.
Walter Roberson
el 1 de Jun. de 2020
There is no configuration setting for the integration block in particular or Simulink in general to have it be happy about complex inputs to the integration, nor to have it accept such inputs with a warning.
Respuestas (0)
Ver también
Categorías
Más información sobre Sources en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!