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
yk<yj+(yiyj)*(tjtk)/(tjti)
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);
N=length(xn);
net=sparse(N,N);
for i=1 to N
(i,i+1)=1
for j=i+2 to N
Dy=(yiyj)/(tjti)
for k=i+1,j1 % points between i and j
g(d)= y(j)+ Dy*(tjtk)
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.
