BEGIN { i = 0; j = 0; k = 0; } { if (( $0 ~ /Simulador de redes/ ) || ( $0 ~ /SIMULADOR DE REDES/ )) {curva[++k] = i+1} if ( ejey == 1 ) { if (( $0 ~ /Retardo medio de la cabecera =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $7} } else if ( ejey == 2 ) { if (( $0 ~ /Retardo medio total =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $5} } else if ( ejey == 3 ) { if (( $0 ~ /Latencia media total =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $5} } else if ( ejey == 4 ) { if ( $0 ~ /Retardo medio\/Latencia media =/ ) {y[++i] = $5} } else if ( ejey == 5 ) { if ( $0 ~ /Mensajes recibidos .total. =/ ) {y[++i] = $5} } else if ( ejey == 6 ) { if ( $0 ~ /Media de mensajes recibidos por nudo=/ ) {y[++i] = $7} } else if ( ejey == 7 ) { if ( $0 ~ /palabras\/ciclo\/nudo/ ) {y[++i] = $4} } else if ( ejey == 8 ) { if (( $0 ~ /Latencia media total desde la generacion =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $8} } else if ( ejey == 9 ) { if ( $0 ~ /Latencia media\/Longitud media =/ ) {y[++i] = $5} } else if ( ejey == 11 ) { if (( $0 ~ /Retardo medio de la cabecera =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $11} } else if ( ejey == 12 ) { if (( $0 ~ /Retardo medio total =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $9} } else if ( ejey == 13 ) { if (( $0 ~ /Latencia media total =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $9} } else if ( ejey == 18 ) { if (( $0 ~ /Latencia media total desde la generacion =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $12} } else if ( ejey == 21 ) { if (( $0 ~ /Retardo medio de la cabecera =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $15} } else if ( ejey == 22 ) { if (( $0 ~ /Retardo medio total =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $13} } else if ( ejey == 23 ) { if (( $0 ~ /Latencia media total =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $13} } else if ( ejey == 28 ) { if (( $0 ~ /Latencia media total desde la generacion =/ ) && ( $0 ~ /Valor/ )) {y[++i] = $16} } if ( ejex == 1 ) { if ( $0 ~ /Productividad \(palabras por ciclo\) =/ ) {x[++j] = $6} } else if ( ejex == 2 ) { if ( $0 ~ /palabras\/ciclo\/nudo/ ) {x[++j] = $4} } else if ( ejex == 3 ) { if ( $0 ~ /Productividad \(palabras por ciclo y nudo\)\/retardo total \(por palabra\) =/ ) {x[++j] = $11} } else if ( ejex == 4 ) { if ( $0 ~ /Productividad \(palabras por ciclo y nudo\)\/latencia total \(por palabra\) =/ ) {x[++j] = $11} } else if ( ejex == 5 ) { if ( $0 ~ /Procesadores :/ ) {x[++j] = $3} } else if ( ejex == 6 ) { if ( $0 ~ /T. final =/ ) {x[++j] = $9} } } END { # print tipo curva[k+1] = i+1 xmin = x[1] xmax = x[1] ymin = y[1] ymax = y[1] for (i=1;i<=j;i++) { if (x[i] < xmin) {xmin = x[i]} if (x[i] > xmax) {xmax = x[i]} if (y[i] < ymin) {ymin = y[i]} if (y[i] > ymax) {ymax = y[i]} } if (divx == 0) {divx = 5} if (divy == 0) {divy = 5} if (deltax == 0) {deltax = (xmax-xmin)/divx} if (deltay == 0) {deltay = (ymax-ymin)/divy} if (origx == -1) {origx = xmin} if (origy == -1) {origy = ymin} if (xmin > origx) {xmin = origx} if (ymin > origy) {ymin = origy} if (xmax < xmin + deltax * divx) {xmax = xmin + deltax * divx} if (ymax < ymin + deltay * divy) {ymax = ymin + deltay * divy} # print xmin,xmax,ymin,ymax # print origx,origy,deltax,deltay # print k for (i=1;i<=k;i++) { # print curva[i+1]-curva[i] for (n=curva[i];n