I have a simple question is that how do i append wait/N to a list, the list shou
ID: 3741818 • Letter: I
Question
I have a simple question is that how do i append wait/N to a list, the list should have 10 elements cuz it is corresponding to 10 operators. Thats a matlab code
a 1: % arrival time par ameter m 10, % number of processors mu 5; % mean processing time sig 1; % s.d. of the processing time Q = 1:m: % set the # processor = m Q 0*Q: % initialise the time when free wait 0; % initialise wait time N = 600000; % watch for N arrivals WL=[] ; 10 for k = 1:N % begin the experiment 12 13 14 - 15 16 17 18 19 20 T = -1/a*log (1-r and); % arrival time of new customer S lognrnd (mu, sig), % compute time to service Q max (Q-T, 0), % Wait on each queue, [t,j] -min(Q): % j has shortest wait time wait -wait+0(j); % add Q's time to reach cash 0(j) = Q(j)+S, % time for Q to clear queue j end % store closes wait/NExplanation / Answer
EITHER YOU CAN USE :
1. WL=[WL wait/N];
or
2. WL(k)=wait/N ;
add any or these inside for loop, that it.
Please give thumbs up, thanks
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.