How to get the name of the input signal in a matlab function (simulink block)
4 visualizaciones (últimos 30 días)
i wondering if there is a way to get the name of the input signal of a "matlab function"-block.
That´s what my model looks like:
I already tried the get_param(u,...) to get the signal name but it didn´t work as the following error occurs: "Function 'get_param' not supported for code generation."
Is there any way to solve this?
Thanks for your help!
Walter Roberson el 22 de Jul. de 2022
Editada: Walter Roberson el 22 de Jul. de 2022
If you are still trying to do that testing about nan, remember that code cannot do dynamic fieldname access in generated code; https://www.mathworks.com/matlabcentral/answers/506792-is-it-possible-to-access-struct-fields-dynamically-in-generated-code#answer_416689
so even if you can get the signal names in generated code, you cannot loop over the names in generated code to test the bus elements by name.