Send request packet

I have created a node and have found its neighbours
for ex lets us assume the source node is 6 ,the neighbours are 4, 8 ,12
please tell how to process the below
type i event is to send a request packet
% create a type-1 event from Source to each neighbour
% sort events array by time of events (using sortrows)

답변 (1개)

Walter Roberson
Walter Roberson 2012년 4월 6일

0 개 추천

current_node = 6;
event_type = 1;
for N = node_definitions(current_node).neighbours
events = create_event(events, event_type, N, current_node);
end
events = sortrow(events);

댓글 수: 2

kash
kash 2012년 4월 6일
Walter i get error as
Undefined variable "node_definitions" or class "node_definitions".
please help
Walter Roberson
Walter Roberson 2012년 4월 7일
My apologies for not correctly guessing your exact variable names and data structures: with the holiday, the Psychic Friends Hotline wasn't available for consultation.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2012년 4월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by