Reputation: 656
I have been searching for a long time and have yet to find a tutorial/answer so I am posting the question here. How can I render a continuous signal within Simulink as a bar graph? The bar graph should be behaving similarly as the native default scope block within Simulink. I.e.: the graph changes in real-time while the signal is running. The same functionality (or close to it) as scope, but in a bar graph format. Any help or directions are appreciated.
Upvotes: 0
Views: 1023
Reputation: 10772
There is a Floating Bar Plot in the Simulink Extras->Additional Sinks library. However, it has very limited functionality.
The best way to do this is to write an (m-code) S-Function. Although not difficult, it's not going to be trivial to do properly. Within the S-Function you'll need to do things like
bar
function itself)You will most likely also need to use some of the block callbacks to do the right thing if the block is deleted (e.g. delete the figure too, if it's still open), copied, etc.
Upvotes: 1