This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function n = ecuacion(L, num_gen) | |
n = L * num_gen * (100000 - num_gen); | |
endfunction |
No hay comentarios:
Publicar un comentario