How do I get the time of an event in Matlab from a SimEvent model?
조회 수: 2 (최근 30일)
이전 댓글 표시
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:

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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!