How do I get the time of an event in Matlab from a SimEvent model?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
How can I write the times and values of an event-based signal to the MATLAB workspace (<http://au.mathworks.com/help/simevents/ug/sending-data-to-the-matlab-workspace.html#bp8t04i>) when I am running the simulation from Matlab?
Here is my code:
clc clear all close all
Period = 0; p=1;
for i=1:1;
Period=Period+1;
simOut= sim('concreting1','SaveOutput','on',...
'SaveTime','on','TimeSaveName','tout',...
'SaveState','on');
z = simOut.get('WaitingInQueue')
r= simOut.get('Pump')
t=simOut.get('tout')
p=p+1;
end
and my model:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153815/image.png)
the r give me the number of entity that left the server and t give me the simulation time not the time of the signal. I need the former.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Discrete-Event Simulation 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!