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!