Effacer les filtres
Effacer les filtres

How do I get the time of an event in Matlab from a SimEvent model?

1 vue (au cours des 30 derniers jours)
Zahra Moussavi
Zahra Moussavi le 2 Fév 2016
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.

Réponses (0)

Catégories

En savoir plus sur Discrete-Event Simulation dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by