Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
cmi [2018/05/31 07:23] – admincmi [2018/06/07 13:35] (Version actuelle) – [Sur le mésocentre] admin
Ligne 7: Ligne 7:
   * http://info.iut-bm.univ-fcomte.fr/staff/mazouzi/mm.c   * http://info.iut-bm.univ-fcomte.fr/staff/mazouzi/mm.c
  
 +<code bash>
 +wget http://info.iut-bm.univ-fcomte.fr/staff/mazouzi/mm.c
 +</code>
  
 ===== Tâches à effectuer ===== ===== Tâches à effectuer =====
Ligne 19: Ligne 22:
  
  
 +==== Plot ====
  
 +<code python>
 +#!/usr/bin/python
 +#-*-coding:utf8-*-
 +from sys import argv
 +from pylab import *
 +
 +if __name__ == "__main__":
 +    if len(argv) != 2:
 +        print "Usage: python", argv[0], " matrix.dat"
 +        exit (0)  
 +
 +
 +f = open ( argv[1] , 'r')
 +A = [ map(float,line.split()) for line in f ]
 +
 +# print A
 +
 +figure(1)
 +#imshow(A, interpolation='nearest')
 +
 +imshow(A)
 +grid(True)
 +
 +#grid(True)
 +show()
 +plot.py (END
 +</code>
  • cmi.1527751401.txt.gz
  • Dernière modification : 2018/05/31 07:23
  • de admin