jueves, 29 de marzo de 2012

Mapa Logistica [Puntos extra]

function generar(L, num_gene, num_prim)
output = fopen("datos.dat", "w");
num_act = num_prim;
for i = 1: num_gene
x = ecuacion(L, num_act);
fprintf(output, "%d %d\n", x)
num_act = x
endfor
fclose(output);
endfunction


function n = ecuacion(L, num_gen)
n = L * num_gen * (100000 - num_gen);
endfunction


No hay comentarios:

Publicar un comentario