Scilab Function
Last update : 5/9/2006

attack - Simulate attack behaviors to the network model

### Calling Sequence

  `g = attack(g,t,flag)`

### Parameters

- `g` : graph list
- `t` : integer
- `flag` : integer (0,1,2)
- `g` : graph list

### Description

  Simulate attack behaviors to the network model. g is the initial model, t is the attack time, flag is the scale factor which represents different attack strategies. flag=0: attack one node randomly flag=1: attack one link randomly flag=2: attack one node with the maximum degree in every time step.

### Examples

    	  [a b]=ba(6,4,9994);
    	  g=make_graph('ba',0,10000,a,b);
    	  t=tran(g('head'),g('tail'),g('node_number'));
    	  disp(eff(t));
    	  g=attack(g,10,2);
    	  t=tran(g('head'),g('tail'),g('node_number'));
    	  disp(eff(t));

### See Also

`eff` ,

### Authors

  Wubo