% Advanced Usage Example
% Make the display a small square
dis.w = 500;
dis.h = 500;
% Increase the charge and the gravity
dis.c = 100;
dis.g = 0.3;
% Give the file a name
dis.name = 'Advanced';
% Name the nodes
dis.nodeNames = {'dane','sebastian','manny','brock','ted','donnie'};
% Give the nodes some labels called hunger that are scalars
dis.labels.hunger.type = 'scalar';
dis.labels.hunger.values = [4,9,2,4,12.1,5];
% Build a few networks
snake(1,2) = 1;
snake(2,3) = 2;
snake(3,4) = 3;
snake(4,5) = 4;
snake(5,6) = 5;
starfish(1,2) = 1;
starfish(1,3) = 1;
starfish(1,4) = 1;
starfish(1,5) = 1;
starfish(1,6) = 1;
% put them into netObjects
nets.snake.adj = snake;
nets.starfish.adj = starfish;
% Add some labels, binary, categorical, etc...
nets.snake.labels.isHead.type = 'binary';
nets.snake.labels.isHead.values = [0,0,0,0,0,1];
nets.snake.labels.slithering.type = 'categorical';
nets.snake.labels.slithering.values = [1,2,2,3,1,2];
nets.starfish.labels.texture.type = 'categorical';
nets.starfish.labels.texture.values = [1,3,0,2,0,1];
nets.starfish.labels.texture.categories = {'chewy','gooey','crunchy','fishy'};
nets.starfish.labels.power.type = 'scalar';
nets.starfish.labels.power.values = [1,3,3.8,0.2,1,3.1415];
% call webweb
webweb(dis,nets) %or webweb(nets,dis);