Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
Create a network adjacency matrix

Subject: Create a network adjacency matrix

From: av

Date: 10 Jul, 2013 10:27:11

Message: 1 of 1

Dear all,

I' m new in Matlab.

I want to create an adjacency network matrix.

Suppose we have a time series of length N. Each point of the time series is a node of a network.

the way in which the points of the time series is connected is:

- each point connected with the next one
- If we have a point i and a point j, these points will become connected if all other points (e.g i<k<j) between i and j fulfills


if i connected with j then in adjacency matrix will should place the number 1 else the number 0

i try to write the following

function createnet=series(xn);


for i=1 to N


    for j=i+2 to N
    for k=i+1,j-1 % points between i and j

    g(d)= y(j)+ Dy*(tj-tk)

    if ( g(d)>yk ) % then i and j connected and we should place the number 1 in adjacency matrix
 if ( g(d)<yk ) % then i and j not connected and we should place the number 0 in adjacency matrix

I know the i need to work hard but I would thus request you, to kindly provide me some guidance on how can this be processed in Matlab.

 Looking forward for your help.


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us