Reputation: 35
I have a, in my opinion, little problem using a Matlab-Function Block in a Simulink Model. I want one of the inputs to be a structure. But that doesn't work so easily, I've come across suggestions on other semi-related problems, which tell about defining Simulink.Bus and so on, but to be honest I don't understand how this can be applied on my problem.
It seems simple:
Structure as input for a Matlab function Block
But I don't know how.
Sorry for the inconvenience.
Regards BZAD
Upvotes: 1
Views: 1682
Reputation: 10762
Within Simulink you create a Bus signal using the Bus Creator Block. This can then be fed into a MATLAB Function block, but only if an accompanying Simulink.Bus object is created in the Base Workspace.
See Types of Structures in MATLAB Function Blocks and Create Structures in MATLAB Function Blocks and the links off those pages for more information.
Upvotes: 3