LATEST UPDATE

CIMA study stuff added

BOX

Friday, July 30, 2010

HT LAB WORK

//CALCULATE ABOUT ARRIVAL TIME

A=[0.4 1.2 0.5 1.7 0.2 1.6 0.2 1.4 1.9]
for(i=1;length(A)),
if(i==1) arrival(i)= A(i),
else,
Arrival(i)=arrival(i-1) +A(i),
end
end

//CALCULATE DEPARTURE TIME

S=[2 0.7 0.2 1.1 3.7 0.6];
Departures = zeros([1 6]);
Delay = zeros([1 6]);
for i=1:6,
Departures(i)=arrival(i) + Delay(i) +S(i),
Delay(i+1)=Departures(i)-arrival(i+1),
if(Delay(i+1)<0) Delay(i+1) =0
end
end
AverageDelay= sum(Delay(1:6))/6


//DELAY

S=[2 0.7 0.2 1.1 3.7 0.6];
Departures=zeros([1 6]);
Delay=zeros([1 6 ]);
for i=1:6
Departures(i) = arrival(i) +Delay(i) +S(i),
Delay(i+1) =Departures(i)-arrival(i+1),
if(Delay(i+1)<0)Delay(i+1) = 0
end
end


//TRACING oF ARRIVAL AND DEPARTURES

arrv6 =arrival(1:6)
dep6=Departures(1:6);
EventTimes=[arrv6;dep6]
[sortedTimes,nTime]=sort(EventTimes)
sortedTimes(2,2)
sortedTimes(1,5)






//plotting events

minusOnes=[-1 -1 -1 -1 -1 -1 ];
y=[ones([1 6]);minusOnes];
stem(EventTimes,y);
for(i=1:12),
x=Event
Times(i),

% text(x+0.1,num2str(EventTimes(i)),'HorizontalAlignment'.'center'),
end

2 comments:

  1. Its incomplete.
    Kindly upload slide somewhere

    ReplyDelete
  2. mmm yar its not working but uni ma chal raha tha i dnt 9 kia problem hai ,,, but agar kisi ko bh sahi code mil jaye to zarror batana

    ReplyDelete

UBIT

SMS AT ANY NETWORK

STAND UP 4 THE CHAMPION

Search This Blog