How can I read data from a histogram in SimEvents (simulink)?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
All the available data is in the form of histograms. Therefore, there is a necessity to read the histogram data and incorporate it into the simulation in the SimEvents package in Simulink. I would like to know if this is possible in SimEvents.
0 Commenti
Risposte (1)
Wilson A N
il 4 Mag 2018
If you have the histogram object, then you can easily retrieve the required data. For example,
hHist = histfit( rand(100,1), 3, 'normal' )
hHist(1).YData
Here hHist is the histogram object. You can obtain the y values by using hHist(1).YData.
Now the following code can be kept in a MATLAB function block. Let the output of the MATLAB function block be the hHist(1).YData which is fed into a Simulink function block. Once the data reaches a Simulink function block, you can retrieve the data from any of the callbacks present in the various SimEvents blocks.
To understand how to use Simulink function blocks with SimEvents blocks, you can check the following example:
seExampleSchedulerBasic
0 Commenti
Vedere anche
Categorie
Scopri di più su Discrete-Event Simulation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!