logistic_map_1 - #define R 2.0 /* r value */ int main() {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* logistic_map1.c * Print population for first NITS iterations of the logistic map. */ #include <stdio.h> #define NITS 50 /* number of iterations */ #define X0 0.1 /* arbitrary starting value */
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #define R 2.0 /* r value */ int main() { int i = 0; float x; x = X0; printf("%d %f\n", i, x); for (i = 1; i <= NITS; i++) { x = R*x*(1.0 - x); printf("%d %f\n", i, x); } return 0; }...
View Full Document

This note was uploaded on 09/29/2009 for the course COSC 1002 taught by Professor Wheatland during the Three '09 term at University of Sydney.

Ask a homework question - tutors are online