Hi, i want to make all point has a connection to other with the following code.
x = [6 3 5 4 7 8];
idx = randperm(length(x));
y = x(idx);
start = x(:,2);
last = x(:,(length(x)));
G = digraph(x,y,w);
G = rmedge(G, 1:numnodes(G), 1:numnodes(G));
path = shortestpath(G, start, last);
disp(['spf = ' num2str(path)]);
Is that possible to all point include no1 & 2 connect to each other?