URI: 
       tinitrnd.c - werner - cellular automata simulation of wind-driven sand transport
  HTML git clone git://src.adamsgaard.dk/werner
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
       tinitrnd.c (604B)
       ---
            1 #include <stdio.h>
            2 #include <stdlib.h>
            3 
            4 // see https://www.gnu.org/software/gsl/manual/html_node/Matrices.html
            5 #include <gsl/gsl_matrix.h>
            6 
            7 #include "wernerparams.h"
            8 #include "werner.h"
            9 
           10 int main(int argc, char** argv)
           11 {
           12     // Allocate matrix Z: number of sand slabs
           13     gsl_matrix* Z = gsl_matrix_alloc(rows, cols);
           14 
           15     // Initialize with random values
           16     init_rnd_matrix(Z, 1.0, 10.0);
           17 
           18     // Add 100 sand slabs to each cell
           19     //gsl_matrix_add_constant(Z, 100.0);
           20 
           21     // Write matrix to stdout
           22     gsl_matrix_fprintf(stdout, Z, "%f");
           23 
           24     // End program
           25     gsl_matrix_free(Z);
           26     return 0;
           27 }